From 4a3622200a3e7f2b475660055d7584543eb20e13 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Tue, 12 Mar 2013 20:25:25 +0100 Subject: [PATCH] Dont exit in FreeBSD/NetBSD subclass in check mode * As the FIXMEs note: only exit if enable state is going to change. * This is already handled in service_enable_rcconf() being called by both subclasses. --- service | 8 -------- 1 file changed, 8 deletions(-) diff --git a/service b/service index 9e4475ec7d9..fb1da54df79 100644 --- a/service +++ b/service @@ -595,10 +595,6 @@ class FreeBsdService(Service): self.rcconf_key = "%s_enable" % self.name - # FIXME: detect the enablement state rather than just running the command - if self.module.check_mode: - self.module.exit_json(changed=True, msg="editing service enablement") - return self.service_enable_rcconf() def service_control(self): @@ -678,10 +674,6 @@ class NetBsdService(Service): else: self.rcconf_value = "NO" - # FIXME: need to decide whether to run enablement command or not - if self.module.check_mode: - self.module.exit_json(changed=True, msg="editing service enablement") - rcfiles = [ '/etc/rc.conf' ] # Overkill? for rcfile in rcfiles: if os.path.isfile(rcfile):