Skip to contentSkip to conversation

multiprocmgr: install both mpmsrv sysvinit initscript and systemd unit file

PATCH New Denys Dmytriyenko 1 participant 1 message Jan 28, 2019 Broadcom iproc Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multiprocmgr: install both mpmsrv sysvinit initscript and systemd unit file

Since both systemd and update-rc.d classes are inherited, not having a corresponding file results in postinst function to fail, which is a hard error now. Having both init files installed does not affect functionality.

---
 recipes-ti/multiprocmgr/multiprocmgr_git.bb | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
recipes-ti/multiprocmgr/multiprocmgr_git.bb +5 -9
index f37b97e3..6143341d 100644
@@ -28,15 +28,11 @@ do_install() {
 	install -c -m 755 ${S}/bin/mpmsrv ${D}${bindir}/mpmsrv
 	install -c -m 755 ${S}/bin/mpmcl ${D}${bindir}/mpmcl
 
-	systemd_enabled=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '0', d)}
-	if [ ${systemd_enabled} -eq 1 ]
-	then
-		install -d ${D}${systemd_system_unitdir}
-		install -m 0644 ${WORKDIR}/mpmsrv-daemon.service ${D}${systemd_system_unitdir}
-	else
-		install -d ${D}${sysconfdir}/init.d/
-		install -c -m 755 ${S}/scripts/mpmsrv-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
-	fi
+	install -d ${D}${systemd_system_unitdir}
+	install -m 0644 ${WORKDIR}/mpmsrv-daemon.service ${D}${systemd_system_unitdir}
+	install -d ${D}${sysconfdir}/init.d/
+	install -c -m 755 ${S}/scripts/mpmsrv-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
+
 	install -d ${D}${sysconfdir}/mpm/
 	install -c -m 755 ${S}/scripts/crash_callback.sh ${D}${sysconfdir}/mpm/crash_callback.sh
 
Signature · 1 line
2.17.1