mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
Fix exit status of ipa-nis-manage enable.
ticket 1247
This commit is contained in:
parent
b203756a88
commit
5f0adc3fbe
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user