summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-server
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-11 13:27:07 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-11 13:27:17 -0400
commitafeeb2b6430875cc3979ae4ad690d2a3efc0ac68 (patch)
tree8e68a03334c5f21cd0974c757b49ef75413d1c18 /src/sbin/bcfg2-server
parentc5b4bfd842a6f03a4c840cd32c3a99bcc57a8c48 (diff)
downloadbcfg2-afeeb2b6430875cc3979ae4ad690d2a3efc0ac68.tar.gz
bcfg2-afeeb2b6430875cc3979ae4ad690d2a3efc0ac68.tar.bz2
bcfg2-afeeb2b6430875cc3979ae4ad690d2a3efc0ac68.zip
moved plugin-specific configs to main config file; propagate "setup" object to server Core
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-xsrc/sbin/bcfg2-server44
1 files changed, 20 insertions, 24 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index 89bc7c331..757172464 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -15,7 +15,6 @@ from Bcfg2.Server.Core import CoreInitError
logger = logging.getLogger('bcfg2-server')
if __name__ == '__main__':
-
OPTINFO = {
'configfile': Bcfg2.Options.CFILE,
'daemon' : Bcfg2.Options.DAEMON,
@@ -23,26 +22,22 @@ if __name__ == '__main__':
'help' : Bcfg2.Options.HELP,
'verbose' : Bcfg2.Options.VERBOSE,
'to_file' : Bcfg2.Options.LOGGING_FILE_PATH,
+ 'repo' : Bcfg2.Options.SERVER_REPOSITORY,
+ 'plugins' : Bcfg2.Options.SERVER_PLUGINS,
+ 'password' : Bcfg2.Options.SERVER_PASSWORD,
+ 'fm' : Bcfg2.Options.SERVER_FILEMONITOR,
+ 'key' : Bcfg2.Options.SERVER_KEY,
+ 'cert' : Bcfg2.Options.SERVER_CERT,
+ 'ca' : Bcfg2.Options.SERVER_CA,
+ 'listen_all': Bcfg2.Options.SERVER_LISTEN_ALL,
+ 'location' : Bcfg2.Options.SERVER_LOCATION,
+ 'passwd' : Bcfg2.Options.SERVER_PASSWORD,
+ 'static' : Bcfg2.Options.SERVER_STATIC,
+ 'encoding' : Bcfg2.Options.ENCODING,
+ 'filelog' : Bcfg2.Options.LOGGING_FILE_PATH,
+ 'protocol' : Bcfg2.Options.SERVER_PROTOCOL,
}
- OPTINFO.update({'repo' : Bcfg2.Options.SERVER_REPOSITORY,
- 'plugins' : Bcfg2.Options.SERVER_PLUGINS,
- 'password' : Bcfg2.Options.SERVER_PASSWORD,
- 'fm' : Bcfg2.Options.SERVER_FILEMONITOR,
- })
-
- OPTINFO.update({'key' : Bcfg2.Options.SERVER_KEY,
- 'cert' : Bcfg2.Options.SERVER_CERT,
- 'ca' : Bcfg2.Options.SERVER_CA,
- 'listen_all' : Bcfg2.Options.SERVER_LISTEN_ALL,
- 'location' : Bcfg2.Options.SERVER_LOCATION,
- 'passwd' : Bcfg2.Options.SERVER_PASSWORD,
- 'static' : Bcfg2.Options.SERVER_STATIC,
- 'encoding' : Bcfg2.Options.ENCODING,
- 'filelog' : Bcfg2.Options.LOGGING_FILE_PATH,
- 'protocol' : Bcfg2.Options.SERVER_PROTOCOL,
- })
-
setup = Bcfg2.Options.OptionParser(OPTINFO)
setup.parse(sys.argv[1:])
try:
@@ -53,9 +48,9 @@ if __name__ == '__main__':
Bcfg2.Component.run_component(Bcfg2.Server.Core.Core,
listen_all=setup['listen_all'],
location=setup['location'],
- daemon = setup['daemon'],
- pidfile_name = setup['daemon'],
- protocol = setup['protocol'],
+ daemon=setup['daemon'],
+ pidfile_name=setup['daemon'],
+ protocol=setup['protocol'],
to_file=setup['to_file'],
cfile=setup['configfile'],
register=False,
@@ -65,10 +60,11 @@ if __name__ == '__main__':
'encoding':setup['encoding'],
'ca':setup['ca'],
'filemonitor':setup['fm'],
- 'start_fam_thread':True},
+ 'start_fam_thread':True,
+ 'setup':setup},
keyfile=setup['key'],
certfile=setup['cert'],
- ca=setup['ca'],
+ ca=setup['ca']
)
except CoreInitError:
msg = sys.exc_info()[1]