1SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
3LICENSE = "MIT"
4
5PR = "r29"
6
7PACKAGE_WRITE_DEPS += "systemd-systemctl-native"
8
9S = "${WORKDIR}"
10
11inherit features_check
12
13INHIBIT_DEFAULT_DEPS = "1"
14
15ALLOW_EMPTY_${PN} = "1"
16
17REQUIRED_DISTRO_FEATURES = "systemd"
18
19SYSTEMD_DISABLED_SYSV_SERVICES = " \
20  busybox-udhcpc \
21  hwclock \
22  networking \
23  nfsserver \
24  nfscommon \
25  syslog.busybox \
26"
27
28pkg_postinst_${PN} () {
29
30	cd $D${sysconfdir}/init.d  ||  exit 0
31
32	echo "Disabling the following sysv scripts: "
33
34	if [ -n "$D" ]; then
35		OPTS="--root=$D"
36	else
37		OPTS=""
38	fi
39
40	for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
41		if [ -e $i -o -e $i.sh ]  &&   ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
42			echo -n "$i: "
43			systemctl $OPTS mask $i.service
44		fi
45	done
46	echo
47}
48
49RDEPENDS_${PN} = "systemd"
50