[debian-edu-commits] debian-edu/ 01/01: Reimplement fix for disabling LTSP services during boot to work properly with systemd.

Petter Reinholdtsen pere at moszumanska.debian.org
Wed Oct 15 08:40:24 UTC 2014


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

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

commit 07585ec230efbfcfed876b17456b38fc9d67b22a
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Wed Oct 15 10:37:08 2014 +0200

    Reimplement fix for disabling LTSP services during boot to work properly with systemd.
---
 share/ltsp/init-ltsp.d/60-edu-client | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/share/ltsp/init-ltsp.d/60-edu-client b/share/ltsp/init-ltsp.d/60-edu-client
index cf61752..b385dcf 100644
--- a/share/ltsp/init-ltsp.d/60-edu-client
+++ b/share/ltsp/init-ltsp.d/60-edu-client
@@ -2,14 +2,20 @@
 
 service_disable() {
     service="$1"
-    if [ -d  /run/systemd/system ] \
-       && [ -f /lib/systemd/system/${service}.service ] ; then
-        systemctl disable ${service}.service
+    if [ systemd = "$BOOTSYSTEM" ] \
+	&& [ -f /lib/systemd/system/${service}.service ] ; then
+	systemctl disable ${service}.service
     else
         update-rc.d $service disable || true
     fi
 }
 
+if grep -q systemd /sbin/init ; then
+    BOOTSYSTEM=systemd
+else
+    BOOTSYSTEM=sysvinit
+fi
+
 # Use systemd compliant systemctl.
 # Remove unused dm services if ldm is used.
 if [ -z "$DEFAULT_DISPLAY_MANAGER" ]; then

-- 
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