summaryrefslogtreecommitdiffstats
path: root/install/tools
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-07-14 09:07:41 +0200
committerRob Crittenden <rcritten@redhat.com>2011-07-15 02:39:17 -0400
commit5f0adc3fbe5b193a57b05eed70b9f59463d9d9da (patch)
treea103a77d18f1c01c5d8e3291e7a13e01a8455d27 /install/tools
parentb203756a886f8d3a16079bea7c047e595b221121 (diff)
downloadfreeipa-5f0adc3fbe5b193a57b05eed70b9f59463d9d9da.tar.gz
freeipa-5f0adc3fbe5b193a57b05eed70b9f59463d9d9da.tar.xz
freeipa-5f0adc3fbe5b193a57b05eed70b9f59463d9d9da.zip
Fix exit status of ipa-nis-manage enable.
ticket 1247
Diffstat (limited to 'install/tools')
-rwxr-xr-xinstall/tools/ipa-nis-manage13
1 files changed, 5 insertions, 8 deletions
diff --git a/install/tools/ipa-nis-manage b/install/tools/ipa-nis-manage
index 2c0936b49..f61610af8 100755
--- a/install/tools/ipa-nis-manage
+++ b/install/tools/ipa-nis-manage
@@ -154,19 +154,16 @@ def main():
# The cn=config entry for the plugin may already exist but it
# could be turned off, handle both cases.
- if (entry is None or
- entry.get('nsslapd-pluginenabled', [''])[0].lower() == 'off'):
- # Already configured, just enable the plugin
+ if entry is None:
print "Enabling plugin"
ld = LDAPUpdate(dm_password=dirman_password, sub_dict={}, ldapi=True)
if ld.update(files) != True:
retval = 1
+ elif entry.get('nsslapd-pluginenabled', [''])[0].lower() == 'off':
+ print "Enabling plugin"
+ # Already configured, just enable the plugin
mod = {'nsslapd-pluginenabled': 'on'}
- try:
- conn.update_entry(nis_config_dn, mod, normalize=False)
- except errors.EmptyModlist:
- # plugin is already enabled, silently continue
- pass
+ conn.update_entry(nis_config_dn, mod, normalize=False)
else:
print "Plugin already Enabled"
retval = 2