diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd-compat-units.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd-compat-units.bb | 41 |
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 0000000000..6419bc2c65 --- /dev/null +++ b/meta/recipes-core/systemd/systemd-compat-units.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" | ||
5 | |||
6 | PR = "r29" | ||
7 | |||
8 | DEPENDS = "systemd-systemctl-native" | ||
9 | |||
10 | inherit allarch | ||
11 | |||
12 | ALLOW_EMPTY_${PN} = "1" | ||
13 | |||
14 | SYSTEMD_DISABLED_SYSV_SERVICES = " \ | ||
15 | busybox-udhcpc \ | ||
16 | hwclock \ | ||
17 | networking \ | ||
18 | nfsserver \ | ||
19 | nfscommon \ | ||
20 | syslog.busybox \ | ||
21 | " | ||
22 | |||
23 | pkg_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 | |||
41 | RDPEPENDS_${PN} = "systemd" | ||