summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-compat-units.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd-compat-units.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units.bb32
1 files changed, 19 insertions, 13 deletions
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index 0b8ff09b2b..55ebf99117 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -1,17 +1,20 @@
SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
-
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
PR = "r29"
-DEPENDS = "systemd-systemctl-native"
+PACKAGE_WRITE_DEPS += "systemd-systemctl-native"
S = "${WORKDIR}"
-inherit allarch
+inherit features_check
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+ALLOW_EMPTY:${PN} = "1"
-ALLOW_EMPTY_${PN} = "1"
+REQUIRED_DISTRO_FEATURES = "systemd"
SYSTEMD_DISABLED_SYSV_SERVICES = " \
busybox-udhcpc \
@@ -22,22 +25,25 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
syslog.busybox \
"
-pkg_postinst_${PN} () {
- cd $D${sysconfdir}/init.d
+pkg_postinst:${PN} () {
- 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_system_unitdir}/$i.service ] ; then
+ echo -n "$i: "
+ systemctl $OPTS mask $i.service
fi
- done ; echo
+ done
+ echo
}
-RDPEPENDS_${PN} = "systemd"
+RDEPENDS:${PN} = "systemd"