From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta/recipes-core/systemd/systemd-compat-units.bb | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd-compat-units.bb (limited to 'meta/recipes-core/systemd/systemd-compat-units.bb') diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb new file mode 100644 index 0000000000..6419bc2c65 --- /dev/null +++ b/meta/recipes-core/systemd/systemd-compat-units.bb @@ -0,0 +1,41 @@ +SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" + +PR = "r29" + +DEPENDS = "systemd-systemctl-native" + +inherit allarch + +ALLOW_EMPTY_${PN} = "1" + +SYSTEMD_DISABLED_SYSV_SERVICES = " \ + busybox-udhcpc \ + hwclock \ + networking \ + nfsserver \ + nfscommon \ + syslog.busybox \ +" + +pkg_postinst_${PN} () { + cd $D${sysconfdir}/init.d + + echo "Disabling the following sysv scripts: " + + OPTS="" + + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + + for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do + if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service \) ] ; then + echo -n "$i: " ; systemctl ${OPTS} mask $i.service + fi + done ; echo +} + +RDPEPENDS_${PN} = "systemd" -- cgit v1.2.3-54-g00ecf