summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-server
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-08-04 21:58:43 +0000
committerSol Jerome <sol.jerome@gmail.com>2010-08-04 16:59:36 -0500
commit5536c3d4017ccc4177821904316fe67b909efe72 (patch)
treefb5e192fd769ea7afd76d57348ce1c79a204029e /src/sbin/bcfg2-server
parenta617d20058389edc2ea40d670e21e2303226bef5 (diff)
downloadbcfg2-5536c3d4017ccc4177821904316fe67b909efe72.tar.gz
bcfg2-5536c3d4017ccc4177821904316fe67b909efe72.tar.bz2
bcfg2-5536c3d4017ccc4177821904316fe67b909efe72.zip
bcfg2-server: logger.error doesn't work when bcfg2.conf doesn't exist
Signed-off-by: Sol Jerome <sol.jerome@gmail.com> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@6001 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-xsrc/sbin/bcfg2-server6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index dd251caa8..36b4c6577 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -46,9 +46,10 @@ if __name__ == '__main__':
setup = Bcfg2.Options.OptionParser(OPTINFO)
setup.parse(sys.argv[1:])
try:
- # check whether the specified bcfg2.conf exists
+ # check whether the specified bcfg2.conf exists
if not os.path.exists(setup['configfile']):
- raise CoreInitError, "Could not read %s" % setup['configfile']
+ print("Could not read %s" % setup['configfile'])
+ sys.exit(1)
Bcfg2.Component.run_component(Bcfg2.Server.Core.Core,
location=setup['location'],
daemon = setup['daemon'],
@@ -71,6 +72,7 @@ if __name__ == '__main__':
except CoreInitError, msg:
logger.error(msg)
logger.error("exiting")
+ sys.exit(1)
except KeyboardInterrupt:
sys.exit(1)
sys.exit(0)