From c36c7532f58f6554cce86a585ed83e92784699ff Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Thu, 8 Dec 2011 17:09:10 +0100 Subject: [PATCH] izmjene unutar cp_get_ldap_realm --- debian/changelog | 6 ++++++ functions.sh | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8d32522..c7461f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +carnet-tools-cn (3.0.3) stable; urgency=low + + * Izmjene unutar cp_get_ldap_realm + + -- Ivan Rako Thu, 08 Dec 2011 17:08:59 +0100 + carnet-tools-cn (3.0.2) stable; urgency=low * cp_get_ldap_suffix cita iz /etc/ldap/slapd.d, ako on ne postoji, cita diff --git a/functions.sh b/functions.sh index d63d500..9b549f5 100644 --- a/functions.sh +++ b/functions.sh @@ -487,8 +487,11 @@ cp_get_ldap_realm() { # but preserving initial state so it could be used afterwards CP_ECHO_RETURN="" - if [ ! -f /etc/ldap/slapd.d/ ]; then - echo "cp_get_ldap_realm: /etc/ldap/slapd.d/: No such directory" >&2 + if [ ! -d /etc/ldap/slapd.d/ ]; then + echo "cp_get_ldap_suffix: /etc/ldap/slapd.d/: No such directory" >&2 + return 2 + elif [ ! -f /etc/ldap/slapd.conf ]; then + echo "cp_get_ldap_suffix: /etc/ldap/slapd.conf: No such file" >&2 return 2 fi -- 1.7.10.4