blob: 55ebf99117fd49980f4d55db405c0187bc42ca08 [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
Brad Bishop6dbb3162019-11-25 09:41:34 -050011inherit features_check
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
Andrew Geissler82c905d2020-04-13 13:39:40 -050013INHIBIT_DEFAULT_DEPS = "1"
14
Patrick Williams213cb262021-08-07 19:21:33 -050015ALLOW_EMPTY:${PN} = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017REQUIRED_DISTRO_FEATURES = "systemd"
18
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019SYSTEMD_DISABLED_SYSV_SERVICES = " \
20 busybox-udhcpc \
21 hwclock \
22 networking \
23 nfsserver \
24 nfscommon \
25 syslog.busybox \
26"
27
Patrick Williams213cb262021-08-07 19:21:33 -050028pkg_postinst:${PN} () {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029
30 cd $D${sysconfdir}/init.d || exit 0
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
32 echo "Disabling the following sysv scripts: "
33
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034 if [ -n "$D" ]; then
35 OPTS="--root=$D"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060036 else
37 OPTS=""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038 fi
39
40 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
Andrew Geissler5199d832021-09-24 16:47:35 -050041 if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_system_unitdir}/$i.service ] ; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060042 echo -n "$i: "
43 systemctl $OPTS mask $i.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -060045 done
46 echo
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047}
48
Patrick Williams213cb262021-08-07 19:21:33 -050049RDEPENDS:${PN} = "systemd"