diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2010-02-24 16:23:55 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-02-24 16:23:55 +0000 |
commit | b9da5b7b1eb0a0782201eb3de73b2ef4bb7548fc (patch) | |
tree | be113395d3e734072deac07022b059e3aa9c7924 /src/sbin | |
parent | eb74c76c6dcf3da2a09831503c2d03453100e0b5 (diff) | |
download | bcfg2-b9da5b7b1eb0a0782201eb3de73b2ef4bb7548fc.tar.gz bcfg2-b9da5b7b1eb0a0782201eb3de73b2ef4bb7548fc.tar.bz2 bcfg2-b9da5b7b1eb0a0782201eb3de73b2ef4bb7548fc.zip |
bcfg2-server: Add sanity check for bcfg2.conf (Resolves Ticket #797)
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5742 ce84e21b-d406-0410-9b95-82705330c041
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'], |