[debian-edu-commits] r83700 - in branches/debian-edu-config/jessie: debian ldap-tools

pere at alioth.debian.org pere at alioth.debian.org
Thu Aug 21 09:40:04 UTC 2014


Author: pere
Date: 2014-08-21 09:40:04 +0000 (Thu, 21 Aug 2014)
New Revision: 83700

Modified:
   branches/debian-edu-config/jessie/debian/changelog
   branches/debian-edu-config/jessie/ldap-tools/ldap-debian-edu-install
Log:
Adjust the ldap-debian-edu-install script to stop named also when
getting Samba SID fail.  This avoid hanging the installer when
setting up LDAP and Kerberos for the the Main Server fail.

Modified: branches/debian-edu-config/jessie/debian/changelog
===================================================================
--- branches/debian-edu-config/jessie/debian/changelog	2014-08-21 09:27:49 UTC (rev 83699)
+++ branches/debian-edu-config/jessie/debian/changelog	2014-08-21 09:40:04 UTC (rev 83700)
@@ -3,6 +3,9 @@
   * Updated Norwegian Bokmål debconf translation.  Translated by Petter
     Reinholdtsen.
   * Add Alexander Alemayhu as uploader.
+  * Adjust the ldap-debian-edu-install script to stop named also when
+    getting Samba SID fail.  This avoid hanging the installer when
+    setting up LDAP and Kerberos for the the Main Server fail.
 
  -- Petter Reinholdtsen <pere at debian.org>  Tue, 19 Aug 2014 22:25:29 +0200
 

Modified: branches/debian-edu-config/jessie/ldap-tools/ldap-debian-edu-install
===================================================================
--- branches/debian-edu-config/jessie/ldap-tools/ldap-debian-edu-install	2014-08-21 09:27:49 UTC (rev 83699)
+++ branches/debian-edu-config/jessie/ldap-tools/ldap-debian-edu-install	2014-08-21 09:40:04 UTC (rev 83700)
@@ -240,6 +240,15 @@
   fi
 }
 
+dns_stop() {
+    # make sure to stop DNS service, to avoid hanging installer.
+    PID=`pidof named || /bin/true`
+    if [ -n "$PID" ]; then
+        echo "info: stopping bind9 with pid $PID"
+       /etc/init.d/bind9 stop
+    fi
+}
+
 # Init tree
 init_ldap () {
 
@@ -474,7 +483,8 @@
     sed -i "s:\$SAMBAPWD:$SAMBAPWD:g" /etc/smbldap-tools/smbldap_bind.conf
 
     if [ -z "$SAMBASID" ] ; then
-      echo "error: unable to fetch Samba SID"
+      echo "error: unable to fetch Samba SID, terminating LDAP and Kerberos configuration."
+      dns_stop
       exit 1
     fi
     # the next line is unknowingly dirty, but it fixes a ,,Can't fetch
@@ -488,11 +498,7 @@
     slapd_stop
     RESTARTSLAPD=$remember_RESTART_SLAPD
 
-    # stop DNS service, as well
-    PID=`pidof named || /bin/true`
-    if [ -n "$PID" ]; then
-       /etc/init.d/bind9 stop
-    fi
+    dns_stop
 
     if [ -x /sbin/start-stop-daemon.REAL ] ; then
         mv /sbin/start-stop-daemon.FAKE /sbin/start-stop-daemon




More information about the debian-edu-commits mailing list