blob: d228a51c19c5b4eb08a84bde6afb60eabec79052 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003LICENSE = "MIT"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5PR = "r29"
6
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007PACKAGE_WRITE_DEPS += "systemd-systemctl-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
9S = "${WORKDIR}"
10
Patrick Williamsc0f7c042017-02-23 20:41:17 -060011inherit distro_features_check
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
13ALLOW_EMPTY_${PN} = "1"
14
Patrick Williamsc0f7c042017-02-23 20:41:17 -060015REQUIRED_DISTRO_FEATURES = "systemd"
16
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017SYSTEMD_DISABLED_SYSV_SERVICES = " \
18 busybox-udhcpc \
19 hwclock \
20 networking \
21 nfsserver \
22 nfscommon \
23 syslog.busybox \
24"
25
26pkg_postinst_${PN} () {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060027
28 cd $D${sysconfdir}/init.d || exit 0
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
30 echo "Disabling the following sysv scripts: "
31
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 if [ -n "$D" ]; then
33 OPTS="--root=$D"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060034 else
35 OPTS=""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036 fi
37
38 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
Patrick Williamsc0f7c042017-02-23 20:41:17 -060039 if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
40 echo -n "$i: "
41 systemctl $OPTS mask $i.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -060043 done
44 echo
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045}
46
Patrick Williamsc0f7c042017-02-23 20:41:17 -060047RDEPENDS_${PN} = "systemd"