blob: 421fc06dfb0e36b3f0940a2b4a9c9ebf597e9144 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
5
6PR = "r29"
7
8DEPENDS = "systemd-systemctl-native"
9
10S = "${WORKDIR}"
11
Patrick Williamsc0f7c042017-02-23 20:41:17 -060012inherit distro_features_check
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
14ALLOW_EMPTY_${PN} = "1"
15
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016REQUIRED_DISTRO_FEATURES = "systemd"
17
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018SYSTEMD_DISABLED_SYSV_SERVICES = " \
19 busybox-udhcpc \
20 hwclock \
21 networking \
22 nfsserver \
23 nfscommon \
24 syslog.busybox \
25"
26
27pkg_postinst_${PN} () {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060028
29 cd $D${sysconfdir}/init.d || exit 0
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
31 echo "Disabling the following sysv scripts: "
32
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033 if [ -n "$D" ]; then
34 OPTS="--root=$D"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035 else
36 OPTS=""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037 fi
38
39 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
Patrick Williamsc0f7c042017-02-23 20:41:17 -060040 if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
41 echo -n "$i: "
42 systemctl $OPTS mask $i.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -060044 done
45 echo
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046}
47
Patrick Williamsc0f7c042017-02-23 20:41:17 -060048RDEPENDS_${PN} = "systemd"