summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-server
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-01-25 16:57:53 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-01-25 16:57:53 +0000
commit1a0f4f60fac591b2f02b5899a9ca5a7735b36198 (patch)
treea67513bacf57e387ebc22006b86ad4213ef82a5e /src/sbin/bcfg2-server
parent2b32110a14d4666732f21429909fc01c6077f8bb (diff)
downloadbcfg2-1a0f4f60fac591b2f02b5899a9ca5a7735b36198.tar.gz
bcfg2-1a0f4f60fac591b2f02b5899a9ca5a7735b36198.tar.bz2
bcfg2-1a0f4f60fac591b2f02b5899a9ca5a7735b36198.zip
fix server bugs
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1720 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-xsrc/sbin/bcfg2-server9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index e3a73ab7b..a528f1864 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -45,6 +45,7 @@ def fatal_error(message):
raise SystemExit, 1
def usage(message, opts, vopts, odescs, vargDescs):
+ '''print usage message'''
logger.critical(message)
[logger.critical(" -%s\t\t\t%s" % (arg, odescs[arg])) for arg in opts]
[logger.critical(" -%s %s\t%s" % (arg, vargDescs[arg], odescs[arg])) for arg in vopts]
@@ -60,7 +61,7 @@ def dgetopt(arglist, opt, vopt, descs, argDescs):
try:
ginfo = getopt.getopt(arglist, gstr)
except getopt.GetoptError, gerr:
- usage("Usage error: %s" % gett, opt, vopt, descs, argsDescs)
+ usage("Usage error: %s" % gerr, opt, vopt, descs, argDescs)
for (gopt, garg) in ginfo[0]:
option = gopt[1:]
@@ -70,11 +71,11 @@ def dgetopt(arglist, opt, vopt, descs, argDescs):
ret[vopt[option]] = garg
if ret["help"] == True:
- print_usage("Usage information", opt, vopt, descs, argDescs)
+ usage("Usage information", opt, vopt, descs, argDescs)
return ret
-class Bcfg2(Bcfg2.Server.Component.Component):
+class Bcfg2Serv(Bcfg2.Server.Component.Component):
"""The Bcfg2 Server component providing XML-RPC access to Bcfg methods"""
__name__ = 'bcfg2'
__implementation__ = 'bcfg2'
@@ -240,7 +241,7 @@ if __name__ == '__main__':
daemonize(ssetup['daemon'])
if not ssetup['configfile']:
ssetup['configfile'] = '/etc/bcfg2.conf'
- s = Bcfg2(ssetup)
+ s = Bcfg2Serv(ssetup)
while not s.shut:
try:
s.serve_forever()