[PATCH 02/16] Make more flexible/debianize the lookup of dirsrv's (389) setup srcitp: it's at "/usr/sbin/setup-ds-admin" in Debian;
Johannes Graumann
johannes_graumann at web.de
Mon Oct 1 16:35:34 CEST 2012
---
pykolab/setup/setup_ldap.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 80c0351..d93e1d8 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -222,11 +222,15 @@ ServerAdminPwd = %(admin_pass)s
os.write(fp, data)
os.close(fp)
- setup_ds_admin = "/usr/sbin/setup-ds-admin.pl"
-
- if not os.path.isfile(setup_ds_admin):
- setup_ds_admin = "/usr/sbin/setup-ds-admin"
-
+ if os.path.isfile("/usr/sbin/setup-ds-admin.pl"):
+ setup_ds_admin = "/usr/sbin/setup-ds-admin.pl"
+ elif os.path.isfile("/usr/sbin/setup-ds-admin"):
+ setup_ds_admin = "/usr/sbin/setup-ds-admin"
+ elif os.path.isfile("/usr/sbin/setup-ds"):
+ setup_ds_admin = "/usr/sbin/setup-ds"
+ else:
+ log.error(_("No directory server setup tool available."))
+
command = [
setup_ds_admin,
'--debug',
--
1.7.10.4
More information about the devel
mailing list