summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2008-06-26 12:06:00 -0400
committerAdrian Likins <alikins@redhat.com>2008-06-26 12:06:00 -0400
commit4cf4083fb47bc00cee7c9b7a03201b2db71e8599 (patch)
tree45b6511be6a91ae917dfd321ae07d2a60d403b40
parent023dd3a5f40d08748189a076c865b6b6bb79b71b (diff)
downloadfunc-4cf4083fb47bc00cee7c9b7a03201b2db71e8599.tar.gz
func-4cf4083fb47bc00cee7c9b7a03201b2db71e8599.tar.xz
func-4cf4083fb47bc00cee7c9b7a03201b2db71e8599.zip
strip any white space passed into services name
patch from Luca Foppiano <lfoppiano@sboing.byte-code.lan>
-rw-r--r--func/minion/modules/service.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/func/minion/modules/service.py b/func/minion/modules/service.py
index 25acea3..7f3d381 100644
--- a/func/minion/modules/service.py
+++ b/func/minion/modules/service.py
@@ -25,6 +25,8 @@ class Service(func_module.FuncModule):
description = "Allows for service control via func."
def __command(self, service_name, command):
+
+ service_name = service_name.strip() # remove useless spaces
filename = os.path.join("/etc/rc.d/init.d/",service_name)
if os.path.exists(filename):