Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix service enable on FreeBSD #3423

Merged
merged 1 commit into from
Jul 3, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion library/system/service
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,14 @@ class FreeBsdService(Service):
if os.path.isfile(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()

Expand Down