autofs: install sysvinit script manually if systemd is enabled

Update-rc.d complains if no sysvinit script is present. This happens
in hybrid systemd/sysvinit builds, because autofs does not install
the init script if configured with '--with-systemd'.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Andreas Oberritter 2019-11-07 21:42:34 +01:00 committed by Khem Raj
parent 1a3ab20ac6
commit d8ab89a24b

View File

@ -79,6 +79,11 @@ do_install_append () {
if [ -d ${D}${localstatedir}/run ]; then
rmdir ${D}${localstatedir}/run
fi
# On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand.
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d -m 755 ${D}${INIT_D_DIR}
install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs
fi
}
SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"