diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-01-08 05:07:17 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-01-08 05:07:17 +0000 |
commit | 27f76c58e706233664a70504c220da3a55c0e06a (patch) | |
tree | 29b0622fac119962e5eb839a77e92ebda638c425 /src/sbin/bcfg2-server | |
parent | dce18cc0f5a3eeb44184d6b3f48f4ad35f8dfad3 (diff) | |
download | bcfg2-27f76c58e706233664a70504c220da3a55c0e06a.tar.gz bcfg2-27f76c58e706233664a70504c220da3a55c0e06a.tar.bz2 bcfg2-27f76c58e706233664a70504c220da3a55c0e06a.zip |
Switch all parsing to outer scripts for Component
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4206 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-x | src/sbin/bcfg2-server | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index 8d8c65170..cb27e9c89 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -33,7 +33,9 @@ class Bcfg2Serv(Bcfg2.Component.Component): def __init__(self, setup): try: - Bcfg2.Component.Component.__init__(self, setup) + Bcfg2.Component.Component.__init__(self, setup['key'], + setup['password'], + setup['location']) except Bcfg2.Component.ComponentInitError: raise SetupError @@ -190,6 +192,12 @@ if __name__ == '__main__': 'structures': Bcfg2.Options.SERVER_STRUCTURES, 'generators': Bcfg2.Options.SERVER_GENERATORS, 'password': Bcfg2.Options.SERVER_PASSWORD}) + OPTINFO.update({'key' : Bcfg2.Options.SERVER_KEY, + 'location' : Bcfg2.Options.SERVER_LOCATION, + 'passwd' : Bcfg2.Options.SERVER_PASSWORD, + 'static' : Bcfg2.Options.SERVER_STATIC, + }) + setup = Bcfg2.Options.OptionParser(OPTINFO) setup.parse(sys.argv[1:]) @@ -203,6 +211,9 @@ if __name__ == '__main__': else: Bcfg2.Logging.setup_logging('bcfg2-server', level=level) + if not setup['key']: + print "No key specified in '%s'" % setup['configfile'] + raise SystemExit, 1 try: BSERV = Bcfg2Serv(setup) |