fix cloud-setup-agent, if selinux is disabled, should return successful, instead of raise an exception

This commit is contained in:
Edison Su 2011-07-18 17:50:02 -07:00
parent 5590cd93ce
commit a89f7c0866
2 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,9 @@ class serviceCfgBase(object):
result = False
try:
result = self.config()
if result is None:
result = False
self.status = result
writeProgressBar(None, result)
return result
@ -369,6 +372,8 @@ class securityPolicyConfigRedhat(serviceCfgBase):
except:
raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloud/setupAgent.log for detail, \
or you can manually disable it before starting myCloud")
else:
return True
def restore(self):
try:

View File

@ -71,6 +71,7 @@ def initLoging(logFile=None):
logging.basicConfig(level=logging.DEBUG)
def writeProgressBar(msg, result):
output = "[%-6s]\n"%"Failed"
if msg is not None:
output = "%-30s"%msg
elif result is True: