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.bb41
1 files changed, 41 insertions, 0 deletions
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 0000000..6419bc2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -0,0 +1,41 @@
1SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
5
6PR = "r29"
7
8DEPENDS = "systemd-systemctl-native"
9
10inherit allarch
11
12ALLOW_EMPTY_${PN} = "1"
13
14SYSTEMD_DISABLED_SYSV_SERVICES = " \
15 busybox-udhcpc \
16 hwclock \
17 networking \
18 nfsserver \
19 nfscommon \
20 syslog.busybox \
21"
22
23pkg_postinst_${PN} () {
24 cd $D${sysconfdir}/init.d
25
26 echo "Disabling the following sysv scripts: "
27
28 OPTS=""
29
30 if [ -n "$D" ]; then
31 OPTS="--root=$D"
32 fi
33
34 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
35 if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service \) ] ; then
36 echo -n "$i: " ; systemctl ${OPTS} mask $i.service
37 fi
38 done ; echo
39}
40
41RDPEPENDS_${PN} = "systemd"