From d3531d0d79e1c6a2375ca4226b86820920a91602 Mon Sep 17 00:00:00 2001 From: Nikolay Panov Date: Fri, 8 Mar 2013 12:07:54 +0700 Subject: [PATCH] Fixed 'service'. Now it respect 'enabled=no' as well. --- service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service b/service index 3209fd4fe99..9e4475ec7d9 100644 --- a/service +++ b/service @@ -743,7 +743,7 @@ def main(): service.get_service_tools() # Enable/disable service startup at boot if requested - if service.module.params['enabled']: + if service.module.params['enabled'] is not None: # FIXME: ideally this should detect if we need to toggle the enablement state, though # it's unlikely the changed handler would need to fire in this case so it's a minor thing. service.service_enable() @@ -766,7 +766,7 @@ def main(): module.fail_json(msg=out) result['changed'] = service.changed - if service.module.params['enabled']: + if service.module.params['enabled'] is not None: result['enabled'] = service.module.params['enabled'] if not service.module.params['state']: