izmjene unutar cp_get_ldap_realm
authorIvan Rako <irako@nekkar.carnet.hr>
Thu, 8 Dec 2011 16:09:10 +0000 (17:09 +0100)
committerIvan Rako <irako@nekkar.carnet.hr>
Thu, 8 Dec 2011 16:09:10 +0000 (17:09 +0100)
debian/changelog
functions.sh

index 8d32522..c7461f8 100644 (file)
@@ -1,3 +1,9 @@
+carnet-tools-cn (3.0.3) stable; urgency=low
+
+  * Izmjene unutar cp_get_ldap_realm
+
+ -- Ivan Rako <Ivan.Rako@CARNet.hr>  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
index d63d500..9b549f5 100644 (file)
@@ -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