cbbfddf86a
Might come with e17 distros; the services should really become configurable, msp@ and sem@ need that already.
63 lines
856 B
Bash
Executable File
63 lines
856 B
Bash
Executable File
#!/bin/sh
|
|
# see also m-p-d::profiles/live/image-scripts.d/init3-services
|
|
|
|
[ -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
|
|
livecd-hostname
|
|
livecd-save-nfs
|
|
livecd-setauth
|
|
livecd-setlocale
|
|
network
|
|
NetworkManager
|
|
connman
|
|
random
|
|
rpcbind
|
|
"
|
|
|
|
# NB: dnsmasq: https://bugzilla.altlinux.org/show_bug.cgi?id=18799
|
|
# NB: sshd might be needed for some particular cases
|
|
DISABLE="
|
|
anacron
|
|
bridge
|
|
clamd
|
|
crond
|
|
dhcpd
|
|
dnsmasq
|
|
mdadm
|
|
netfs
|
|
openvpn
|
|
rawdevices
|
|
slapd
|
|
smartd
|
|
sshd
|
|
update_wms
|
|
xinetd
|
|
"
|
|
|
|
for i in $ENABLE; do switch $i on; done
|
|
for i in $DISABLE; do switch $i off; done
|
|
:
|