summaryrefslogtreecommitdiffstats
path: root/ipa-radius-admintools/ipa-addradiusprofile
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2008-08-15 18:08:01 +0200
committerMartin Nagy <mnagy@redhat.com>2008-09-11 23:34:01 +0200
commit885103c32127d10250564e25c5895464fb366f9e (patch)
tree5db92cd0d4282b3e1aacbfc04c9d076a0d515bec /ipa-radius-admintools/ipa-addradiusprofile
parent57669ba43224eee0d90556aeea03d14873b4bd7f (diff)
downloadfreeipa-885103c32127d10250564e25c5895464fb366f9e.tar.gz
freeipa-885103c32127d10250564e25c5895464fb366f9e.tar.xz
freeipa-885103c32127d10250564e25c5895464fb366f9e.zip
Rework config.py and change cli tools. Maintain order of IPA servers from command line, config and DNS. Parse options before detecting IPA configuration. Don't ignore rest of the options if one is missing in ipa.conf. Drop the --usage options, we will rely on --help. Fixes: 458869, 459070, 458980, 459234
Diffstat (limited to 'ipa-radius-admintools/ipa-addradiusprofile')
-rw-r--r--ipa-radius-admintools/ipa-addradiusprofile10
1 files changed, 6 insertions, 4 deletions
diff --git a/ipa-radius-admintools/ipa-addradiusprofile b/ipa-radius-admintools/ipa-addradiusprofile
index 66db52267..aa3bf9c1f 100644
--- a/ipa-radius-admintools/ipa-addradiusprofile
+++ b/ipa-radius-admintools/ipa-addradiusprofile
@@ -77,13 +77,15 @@ def main():
opt_parser.set_usage("Usage: %s [options] %s" % (distinguished_attr, os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error('missing %s' % (distinguished_attr))
- uid = args[1]
+ ipa.config.init_config(options)
+
+ uid = args[0]
user_profile = not options.shared
pairs[distinguished_attr] = uid