from .xlate import XLATOR
-__version__ = '3.3.4'
+__version__ = '3.4.1'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
commands.append("usermod -c 'root {}' root".format(vm.fqdn))
commands.append("chmod +x /tmp/conf-resolver")
- commands.append("/tmp/conf-resolver")
+ cmd = '/tmp/conf-resolver'
+ if self.verbose:
+ cmd += ' --verbose'
+ for ns in vm.nameservers:
+ cmd += ' --ns {!r}'.format(ns)
+ for dom in vm.searchdomains:
+ cmd += ' --search {!r}'.format(dom)
+ if vm.dns_options:
+ cmd += ' --options {!r}'.format(vm.dns_options)
+ else:
+ cmd += ' --options {!r}'.format('')
+ commands.append(cmd)
commands.append("rm -f /tmp/conf-resolver")
purpose = self.re_doublequote.sub('\\\"', vm.purpose)