Commit 0efba3e4 authored by Michael Shigorin's avatar Michael Shigorin

live: support systemctl to enable *dm

systemd is a tricky beast: getting it to actually launch gdm required considerable effort on the part of stupid myself. The relevant links: * https://wiki.archlinux.org/index.php/Systemd#Running_DEs_under_systemd * http://unix.stackexchange.com/a/35626/15296 Still looks pretty dirty, and there's some duplication with a hook in features.in/slinux as well.
parent 6a6a0e1c
#!/bin/sh
# see also m-p-d::profiles/live/image-scripts.d/init3-services
[ -x /sbin/chkconfig ] || exit 0
[ -x /sbin/chkconfig -o -x /bin/systemctl ] || exit 0
switch() {
case "$2" in
on)
cc=on; sc=enable;;
off)
cc=off; sc=disable;;
esac
{
[ ! -x /bin/systemctl ] || /bin/systemctl $sc $1.service
[ ! -x /sbin/chkconfig ] || /sbin/chkconfig $1 $cc
} 2>/dev/null
}
ENABLE="
dm
gdm
kdm
wdm
prefdm
alteratord
livecd-evms
livecd-fstab
......@@ -38,6 +56,6 @@ update_wms
xinetd
"
for i in $ENABLE; do chkconfig $i on 2>/dev/null; done
for i in $DISABLE; do chkconfig $i off 2>/dev/null; done
for i in $ENABLE; do switch $i on; done
for i in $DISABLE; do switch $i off; done
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment