From e38407cb7e5fae9f7f3b6750d791175bd134c92e Mon Sep 17 00:00:00 2001 From: Edison Su Date: Fri, 23 Sep 2011 14:39:16 -0700 Subject: [PATCH] fix adding host on ubuntu Reviewed-by:frank --- python/lib/cloudutils/utilities.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py index f6e7e5cfac9..89c57b02428 100755 --- a/python/lib/cloudutils/utilities.py +++ b/python/lib/cloudutils/utilities.py @@ -163,7 +163,7 @@ class serviceOpsUbuntu(serviceOps): except: return False - def stopService(self, servicename,force=False): + def stopService(self, servicename,force=True): if self.isServiceRunning(servicename) or force: return bash("sudo /usr/sbin/service " + servicename +" stop").isSuccess() @@ -172,11 +172,11 @@ class serviceOpsUbuntu(serviceOps): bash("sudo update-rc.d -f " + servicename + " remove") return result - def startService(self, servicename,force=False): + def startService(self, servicename,force=True): if not self.isServiceRunning(servicename) or force: return bash("sudo /usr/sbin/service " + servicename + " start").isSuccess() - def enableService(self, servicename,forcestart=False): + def enableService(self, servicename,forcestart=True): bash("sudo update-rc.d -f " + servicename + " remove") bash("sudo update-rc.d -f " + servicename + " defaults") return self.startService(servicename,force=forcestart)