summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-server
diff options
context:
space:
mode:
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)