[debian-edu-commits] debian-edu/ 01/02: Replace 'systemctl' with 'service' in ldap-tools/ldap-debian-edu-install.

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Sun Aug 21 11:31:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch master
in repository debian-edu-config.

commit 62cdbabb956f4c33c45c9efe5158aba9be7a6be5
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sun Aug 21 13:21:58 2016 +0200

    Replace 'systemctl' with 'service' in ldap-tools/ldap-debian-edu-install.
    
    At least for some daemons (like slapd and bind9) the start/stop calls using
    systemctl don't work any longer inside the Debian-Installer target.
---
 ldap-tools/ldap-debian-edu-install | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ldap-tools/ldap-debian-edu-install b/ldap-tools/ldap-debian-edu-install
index 0bc82c5..ec27aed 100755
--- a/ldap-tools/ldap-debian-edu-install
+++ b/ldap-tools/ldap-debian-edu-install
@@ -193,7 +193,7 @@ slapd_stop() {
   if [ -f /var/run/slapd/slapd.pid ] &&
     kill -0 $(cat /var/run/slapd/slapd.pid) ; then
     RESTARTSLAPD=true
-    systemctl stop slapd.service
+    service slapd stop
 
     # Make sure slapd is really stopped
     SLAPPIDS=$(pidof slapd || /bin/true)
@@ -249,7 +249,7 @@ dns_stop() {
     PID=`pidof named || /bin/true`
     if [ -n "$PID" ]; then
         echo "info: stopping bind9 with pid $PID"
-       systemctl stop bind9.service
+       service bind9 stop
     fi
 }
 
@@ -403,7 +403,7 @@ EOF
   PID=`pidof slapd || /bin/true`
   if [ -z "$PID" ]; then
       echo "The LDAP server slapd seems not to be running. Trying to start slapd." 1>&2
-      systemctl start slapd.service
+      service slapd start
       slapd_started=true
   fi
 
@@ -416,7 +416,7 @@ EOF
     ## FIXME: this next part now is experimental... it needs sanity checks...
 
     # Samba will also need DNS to bind to LDAP
-    systemctl start bind9.service
+    service bind9 start
 
     # sync DNS from LDAP for the first time... (this has to run as uid ,,bind''!)
     su -s /bin/sh -c "PATH=/usr/sbin:/sbin:/usr/bin:/bin /usr/sbin/ldap2bind" - bind
@@ -539,7 +539,7 @@ EOF
     echo "info: migrating SLAPD configuration to slapd.d format"
     mkdir /etc/ldap/slapd.d
     slapd -f /etc/ldap/slapd.conf -F /etc/ldap/slapd.d
-    systemctl stop slapd.service
+    service slapd stop
     chown -R openldap:openldap /etc/ldap/slapd.d
     # In case the init.d script fail to stop the service (which it
     # does when testing 2010-09-07).
@@ -584,7 +584,7 @@ fi
 # Restart ldap server if we stopped it and it aint already running
 SLAPPIDS=$(pidof slapd || /bin/true)
 if [ true = "$RESTARTSLAPD" ] && [ -z "$SLAPPIDS" ] ; then
-  systemctl start slapd.service
+  service slapd start
 fi
 
 #$MTAINIT start

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list