Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | S = "${WORKDIR}" |
| 11 | |
| 12 | inherit allarch |
| 13 | |
| 14 | ALLOW_EMPTY_${PN} = "1" |
| 15 | |
| 16 | SYSTEMD_DISABLED_SYSV_SERVICES = " \ |
| 17 | busybox-udhcpc \ |
| 18 | hwclock \ |
| 19 | networking \ |
| 20 | nfsserver \ |
| 21 | nfscommon \ |
| 22 | syslog.busybox \ |
| 23 | " |
| 24 | |
| 25 | pkg_postinst_${PN} () { |
| 26 | cd $D${sysconfdir}/init.d |
| 27 | |
| 28 | echo "Disabling the following sysv scripts: " |
| 29 | |
| 30 | OPTS="" |
| 31 | |
| 32 | if [ -n "$D" ]; then |
| 33 | OPTS="--root=$D" |
| 34 | fi |
| 35 | |
| 36 | for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do |
| 37 | if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service \) ] ; then |
| 38 | echo -n "$i: " ; systemctl ${OPTS} mask $i.service |
| 39 | fi |
| 40 | done ; echo |
| 41 | } |
| 42 | |
| 43 | RDPEPENDS_${PN} = "systemd" |