Merge pull request #3423 from arsatiki/devel

Fix service enable on FreeBSD
pull/3418/merge
Michael DeHaan 12 years ago
commit 2f4c930d35

@ -694,7 +694,14 @@ class FreeBsdService(Service):
if os.path.isfile(rcfile): if os.path.isfile(rcfile):
self.rcconf_file = rcfile self.rcconf_file = rcfile
self.rcconf_key = "%s_enable" % self.name rc, stdout, stderr = self.execute_command("%s %s %s %s" % (self.svc_cmd, self.name, 'rcvar', self.arguments))
rcvars = shlex.split(stdout, comments=True)
if not rcvars:
self.module.fail_json(msg="unable to determine rcvar")
# In rare cases, i.e. sendmail, rcvar can return several key=value pairs
# Usually there is just one, however.
self.rcconf_key = rcvars[0].split('=')[0]
return self.service_enable_rcconf() return self.service_enable_rcconf()

Loading…
Cancel
Save