diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb index 0b8ff09b2..421fc06df 100644 --- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb @@ -9,10 +9,12 @@ DEPENDS = "systemd-systemctl-native" S = "${WORKDIR}" -inherit allarch +inherit distro_features_check ALLOW_EMPTY_${PN} = "1" +REQUIRED_DISTRO_FEATURES = "systemd" + SYSTEMD_DISABLED_SYSV_SERVICES = " \ busybox-udhcpc \ hwclock \ @@ -23,21 +25,24 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \ " pkg_postinst_${PN} () { - cd $D${sysconfdir}/init.d - echo "Disabling the following sysv scripts: " + cd $D${sysconfdir}/init.d || exit 0 - OPTS="" + 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 $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 + 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 + done + echo } -RDPEPENDS_${PN} = "systemd" +RDEPENDS_${PN} = "systemd" |