From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../recipes-core/systemd/systemd-compat-units.bb | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 poky/meta/recipes-core/systemd/systemd-compat-units.bb (limited to 'poky/meta/recipes-core/systemd/systemd-compat-units.bb') diff --git a/poky/meta/recipes-core/systemd/systemd-compat-units.bb b/poky/meta/recipes-core/systemd/systemd-compat-units.bb new file mode 100644 index 000000000..d228a51c1 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-compat-units.bb @@ -0,0 +1,47 @@ +SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" +LICENSE = "MIT" + +PR = "r29" + +PACKAGE_WRITE_DEPS += "systemd-systemctl-native" + +S = "${WORKDIR}" + +inherit distro_features_check + +ALLOW_EMPTY_${PN} = "1" + +REQUIRED_DISTRO_FEATURES = "systemd" + +SYSTEMD_DISABLED_SYSV_SERVICES = " \ + busybox-udhcpc \ + hwclock \ + networking \ + nfsserver \ + nfscommon \ + syslog.busybox \ +" + +pkg_postinst_${PN} () { + + cd $D${sysconfdir}/init.d || exit 0 + + echo "Disabling the following sysv scripts: " + + if [ -n "$D" ]; then + OPTS="--root=$D" + else + OPTS="" + fi + + for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do + if [ -e $i -o -e $i.sh ] && ! [ -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 +} + +RDEPENDS_${PN} = "systemd" -- cgit v1.2.3