mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-26 19:47:17 +00:00
systemd-compat-units: move list of disabled services to variable, fix hwclock.sh and output
* variable allows to add items in .bbappend without overwritting whole postinst * hwclock.service should be used to blacklist SYSV hwclock.sh (not hwclock.sh.service) * show only newly disabled SYSV scripts Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ DESCRIPTION = "Units to make systemd work better with existing sysvinit scripts"
|
|||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
||||||
|
|
||||||
PR = "r15"
|
PR = "r16"
|
||||||
|
|
||||||
inherit allarch
|
inherit allarch
|
||||||
|
|
||||||
@@ -26,15 +26,24 @@ do_install() {
|
|||||||
chmod 0755 ${D}${bindir}/runlevel
|
chmod 0755 ${D}${bindir}/runlevel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYSTEMD_DISABLED_SYSV_SERVICES = " \
|
||||||
|
busybox-udhcpc \
|
||||||
|
dnsmasq \
|
||||||
|
hwclock \
|
||||||
|
networking \
|
||||||
|
syslog \
|
||||||
|
syslog.busybox \
|
||||||
|
"
|
||||||
|
|
||||||
pkg_postinst_${PN} () {
|
pkg_postinst_${PN} () {
|
||||||
cd $D${sysconfdir}/init.d
|
cd $D${sysconfdir}/init.d
|
||||||
|
|
||||||
echo -n "Disabling the following sysv scripts: "
|
echo -n "Disabling the following sysv scripts: "
|
||||||
|
|
||||||
for i in busybox-udhcpc dnsmasq hwclock.sh networking syslog syslog.busybox ; do
|
for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
|
||||||
if [ -e $i ] ; then
|
if [ \( -e $i -o $i.sh \) -a ! -e $D${base_libdir}/systemd/system/$i.service ] ; then
|
||||||
echo -n "$i " ; ln -s /dev/null $D${systemd_unitdir}/system/$i.service
|
echo -n "$i " ; ln -s /dev/null $D${base_libdir}/systemd/system/$i.service
|
||||||
fi
|
fi
|
||||||
done ; echo
|
done ; echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user