summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-server
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-21 15:19:03 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-21 15:19:03 -0400
commit1a43d45badb0c5127b75dfef436bd45af5ed916c (patch)
treeb8de6ab35e2275cae17ce6e89c3c7087b997c237 /src/sbin/bcfg2-server
parent5bdcf1ce5fb01aeca47d36f5b96924182c950869 (diff)
downloadbcfg2-1a43d45badb0c5127b75dfef436bd45af5ed916c.tar.gz
bcfg2-1a43d45badb0c5127b75dfef436bd45af5ed916c.tar.bz2
bcfg2-1a43d45badb0c5127b75dfef436bd45af5ed916c.zip
added option groups
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-xsrc/sbin/bcfg2-server34
1 files changed, 7 insertions, 27 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index 1b8b0d158..d03edc93e 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -15,31 +15,11 @@ from Bcfg2.Server.Core import CoreInitError
logger = logging.getLogger('bcfg2-server')
if __name__ == '__main__':
- OPTINFO = {
- 'configfile': Bcfg2.Options.CFILE,
- 'daemon' : Bcfg2.Options.DAEMON,
- 'debug' : Bcfg2.Options.DEBUG,
- '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,
- 'ignore' : Bcfg2.Options.SERVER_FAM_IGNORE,
- '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)
+ optinfo = dict()
+ optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS)
+ optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS)
+ optinfo.update(Bcfg2.Options.DAEMON_COMMON_OPTIONS)
+ setup = Bcfg2.Options.OptionParser(optinfo)
setup.parse(sys.argv[1:])
try:
# check whether the specified bcfg2.conf exists
@@ -52,7 +32,7 @@ if __name__ == '__main__':
daemon=setup['daemon'],
pidfile_name=setup['daemon'],
protocol=setup['protocol'],
- to_file=setup['to_file'],
+ to_file=setup['logging'],
cfile=setup['configfile'],
register=False,
cls_kwargs={'repo':setup['repo'],
@@ -60,7 +40,7 @@ if __name__ == '__main__':
'password':setup['password'],
'encoding':setup['encoding'],
'ca':setup['ca'],
- 'filemonitor':setup['fm'],
+ 'filemonitor':setup['filemonitor'],
'start_fam_thread':True,
'setup':setup},
keyfile=setup['key'],