mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-12 16:32:01 -05:00
Fix exit status of ipa-nis-manage enable.
ticket 1247
This commit is contained in:
1 parent
b203756a88
commit
5f0adc3fbe
1 file changed
+5
-8
@@ -154,19 +154,16 @@ def main():
|
|||||||
|
|
||||||
# The cn=config entry for the plugin may already exist but it
|
# The cn=config entry for the plugin may already exist but it
|
||||||
# could be turned off, handle both cases.
|
# could be turned off, handle both cases.
|
||||||
if (entry is None or
|
if entry is None:
|
||||||
entry.get('nsslapd-pluginenabled', [''])[0].lower() == 'off'):
|
|
||||||
# Already configured, just enable the plugin
|
|
||||||
print "Enabling plugin"
|
print "Enabling plugin"
|
||||||
ld = LDAPUpdate(dm_password=dirman_password, sub_dict={}, ldapi=True)
|
ld = LDAPUpdate(dm_password=dirman_password, sub_dict={}, ldapi=True)
|
||||||
if ld.update(files) != True:
|
if ld.update(files) != True:
|
||||||
retval = 1
|
retval = 1
|
||||||
|
elif entry.get('nsslapd-pluginenabled', [''])[0].lower() == 'off':
|
||||||
|
print "Enabling plugin"
|
||||||
|
# Already configured, just enable the plugin
|
||||||
mod = {'nsslapd-pluginenabled': 'on'}
|
mod = {'nsslapd-pluginenabled': 'on'}
|
||||||
try:
|
conn.update_entry(nis_config_dn, mod, normalize=False)
|
||||||
conn.update_entry(nis_config_dn, mod, normalize=False)
|
|
||||||
except errors.EmptyModlist:
|
|
||||||
# plugin is already enabled, silently continue
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
print "Plugin already Enabled"
|
print "Plugin already Enabled"
|
||||||
retval = 2
|
retval = 2
|
||||||
|
|||||||
Reference in new issue
Block a user