live: use/services instead of homemade script hook
03-services was a hasty hack that has been long done properly elsewhere, namely in a specialized feature; finally got around to deduplicate it out.
This commit is contained in:
parent
7fafe134c6
commit
75bf4afcaa
@ -1,10 +1,22 @@
|
|||||||
+live: use/live/desktop; @:
|
+live: use/live/desktop; @:
|
||||||
|
|
||||||
|
# service defaults
|
||||||
|
_ON = alteratord cpufreq-simple dm kdm wdm prefdm \
|
||||||
|
livecd-evms livecd-fstab livecd-hostname \
|
||||||
|
livecd-setauth livecd-setlocale livecd-net-eth livecd-install-wmaker \
|
||||||
|
random rpcbind plymouth avahi-daemon \
|
||||||
|
|
||||||
|
_OFF = anacron blk-availability bridge clamd crond dhcpd dmeventd dnsmasq \
|
||||||
|
lvm2-lvmetad lvm2-monitor mdadm netfs o2cb ocfs2 openvpn postfix \
|
||||||
|
rawdevices slapd smartd sshd sysstat update_wms xinetd
|
||||||
|
|
||||||
# copy stage2 as live
|
# copy stage2 as live
|
||||||
# NB: starts to preconfigure but doesn't use/cleanup yet
|
# NB: starts to preconfigure but doesn't use/cleanup yet
|
||||||
use/live: use/stage2 sub/rootfs@live sub/stage2@live
|
use/live: use/stage2 sub/rootfs@live sub/stage2@live use/services
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call add,CLEANUP_PACKAGES,'installer*')
|
@$(call add,CLEANUP_PACKAGES,'installer*')
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,$(_ON))
|
||||||
|
@$(call add,DEFAULT_SERVICES_DISABLE,$(_OFF))
|
||||||
|
|
||||||
use/live/base: use/live use/syslinux/ui/menu
|
use/live/base: use/live use/syslinux/ui/menu
|
||||||
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
|
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
#!/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 --no-reload $sc $1.service
|
|
||||||
|
|
||||||
[ ! -x /sbin/chkconfig ] ||
|
|
||||||
/sbin/chkconfig $1 $cc
|
|
||||||
} 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
ENABLE="
|
|
||||||
dm
|
|
||||||
kdm
|
|
||||||
wdm
|
|
||||||
prefdm
|
|
||||||
alteratord
|
|
||||||
livecd-evms
|
|
||||||
livecd-fstab
|
|
||||||
livecd-hostname
|
|
||||||
livecd-save-nfs
|
|
||||||
livecd-setauth
|
|
||||||
livecd-setlocale
|
|
||||||
livecd-net-eth
|
|
||||||
livecd-install-wmaker
|
|
||||||
network
|
|
||||||
NetworkManager
|
|
||||||
connman
|
|
||||||
random
|
|
||||||
rpcbind
|
|
||||||
plymouth
|
|
||||||
avahi-daemon
|
|
||||||
cpufreq-simple
|
|
||||||
"
|
|
||||||
|
|
||||||
# NB: dnsmasq: https://bugzilla.altlinux.org/show_bug.cgi?id=18799
|
|
||||||
# NB: sshd might be needed for some particular cases
|
|
||||||
DISABLE="
|
|
||||||
anacron
|
|
||||||
blk-availability
|
|
||||||
bridge
|
|
||||||
clamd
|
|
||||||
crond
|
|
||||||
dhcpd
|
|
||||||
dmeventd
|
|
||||||
dnsmasq
|
|
||||||
lvm2-lvmetad
|
|
||||||
lvm2-monitor
|
|
||||||
mdadm
|
|
||||||
netfs
|
|
||||||
o2cb
|
|
||||||
ocfs2
|
|
||||||
openvpn
|
|
||||||
postfix
|
|
||||||
rawdevices
|
|
||||||
slapd
|
|
||||||
smartd
|
|
||||||
sshd
|
|
||||||
sysstat
|
|
||||||
update_wms
|
|
||||||
xinetd
|
|
||||||
"
|
|
||||||
|
|
||||||
for i in $ENABLE; do switch $i on; done
|
|
||||||
for i in $DISABLE; do switch $i off; done
|
|
||||||
:
|
|
Loading…
Reference in New Issue
Block a user