|
|
|
@ -780,6 +780,7 @@ class LinuxService(Service):
|
|
|
|
|
action = 'enable'
|
|
|
|
|
klinks = glob.glob('/etc/rc?.d/K??' + self.name)
|
|
|
|
|
if not klinks:
|
|
|
|
|
if not self.module.check_mode:
|
|
|
|
|
(rc, out, err) = self.execute_command("%s %s defaults" % (self.enable_cmd, self.name))
|
|
|
|
|
if rc != 0:
|
|
|
|
|
if err:
|
|
|
|
@ -789,9 +790,7 @@ class LinuxService(Service):
|
|
|
|
|
else:
|
|
|
|
|
action = 'disable'
|
|
|
|
|
|
|
|
|
|
if self.module.check_mode:
|
|
|
|
|
rc = 0
|
|
|
|
|
return
|
|
|
|
|
if not self.module.check_mode:
|
|
|
|
|
(rc, out, err) = self.execute_command("%s %s %s" % (self.enable_cmd, self.name, action))
|
|
|
|
|
if rc != 0:
|
|
|
|
|
if err:
|
|
|
|
|