blob: c03d97f9c936a2bd1766b8906ba6377a0855c391 [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
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006PACKAGE_WRITE_DEPS += "systemd-systemctl-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
8S = "${WORKDIR}"
9
Brad Bishop6dbb3162019-11-25 09:41:34 -050010inherit features_check
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011
Andrew Geissler82c905d2020-04-13 13:39:40 -050012INHIBIT_DEFAULT_DEPS = "1"
13
Patrick Williams213cb262021-08-07 19:21:33 -050014ALLOW_EMPTY:${PN} = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
Patrick Williams2a254922023-08-11 09:48:11 -050016REQUIRED_DISTRO_FEATURES += "systemd"
17REQUIRED_DISTRO_FEATURES += "usrmerge"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060018
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
Patrick Williamsda295312023-12-05 16:48:56 -060030 test -d $D${sysconfdir}/init.d || exit 0
31 cd $D${sysconfdir}/init.d
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
33 echo "Disabling the following sysv scripts: "
34
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035 if [ -n "$D" ]; then
36 OPTS="--root=$D"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060037 else
38 OPTS=""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039 fi
40
41 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
Andrew Geissler5199d832021-09-24 16:47:35 -050042 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 -060043 echo -n "$i: "
44 systemctl $OPTS mask $i.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -060046 done
47 echo
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048}
49
Patrick Williams213cb262021-08-07 19:21:33 -050050RDEPENDS:${PN} = "systemd"