From cd9f13d2f8a6852c4f23b7e6a5fa07b637156dbc Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 26 Nov 2008 19:09:37 +0000 Subject: Add bcfg2-admin option information to help message (reported by Gabe Turner) [bugfix] git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4988 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/bcfg2-admin | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index 71ac68efc..7ed79b4b2 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -17,6 +17,7 @@ def mode_import(modename): if __name__ == '__main__': Bcfg2.Logger.setup_logging('bcfg2-admin', to_console=True, level=40) + avail_opts = {'-C ': 'Set alternate bcfg2.conf location'} # Get config file path configfile = Bcfg2.Options.CFILE.default try: @@ -35,13 +36,16 @@ if __name__ == '__main__': modes.remove('mode') if len(args) < 1 or args[0] == 'help': - print ("Usage: bcfg2-admin MODE [ARGS]\n\n" - "Available modes are:") + print ("Usage: bcfg2-admin [OPTIONS] MODE [ARGS]\n\n" + "Available options are:") + for (opt, arg) in avail_opts.iteritems(): + print (" %-15s " % opt + arg) + print ("\nAvailable modes are:") if len(args) > 1: args = [args[1], args[0]] else: for mode in modes: - print (" %-12s %s" % + print (" %-15s %s" % (mode, mode_import(mode).__shorthelp__)) raise SystemExit(0) if args[0] in modes: -- cgit v1.2.3-1-g7c22