diff options
Diffstat (limited to 'src/sbin')
-rwxr-xr-x | src/sbin/bcfg2-server | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index 5c058bc2a..73802965e 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -4,6 +4,7 @@ __revision__ = '$Revision$' import logging +import os.path import sys import Bcfg2.Logger @@ -45,6 +46,9 @@ if __name__ == '__main__': setup = Bcfg2.Options.OptionParser(OPTINFO) setup.parse(sys.argv[1:]) try: + # check whether the specified bcfg2.conf exists + if not os.path.exists(setup['configfile']): + raise CoreInitError, "Could not read %s" % setup['configfile'] Bcfg2.Component.run_component(Bcfg2.Server.Core.Core, location=setup['location'], daemon = setup['daemon'], |