summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-nis-manage
diff options
context:
space:
mode:
Diffstat (limited to 'install/tools/ipa-nis-manage')
-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