[Petter Reinholdtsen]
> I am currently testing a function like this in our
> /usr/share/ltsp/init-ltsp.d/60-edu-client file, which might address
> some of your questions:

That approach did not work, because /run/systemd/system is not yet
created when the init-ltsp.d scripts are executed.  This on the other
hand do work:

  if grep -q systemd /sbin/init ; then
    BOOTSYSTEM=systemd
  else
    BOOTSYSTEM=sysvinit
  fi

  service_disable() {
    service="$1"
    if [ systemd = "$BOOTSYSTEM" ] \
        && [ -f /lib/systemd/system/${service}.service ] ; then
        systemctl disable ${service}.service
    else
        update-rc.d $service disable || true
    fi
  }
-- 
Happy hacking
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to