]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysstat: Correct our systemd unit file
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Wed, 13 Nov 2019 05:14:03 +0000 (06:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Nov 2019 12:55:57 +0000 (12:55 +0000)
In commit 8862f21e (sysstat: 12.1.3 -> 12.1.6), sa_lib_dir was changed
from "${libdir}/sa" to "${libexecdir}/sa" to avoid problems with
multilib. However, the systemd unit file was not changed accordingly,
which lead to the following error when trying to start the service:

  systemd[4698]: sysstat.service: Failed at step EXEC spawning
  /usr/lib/sa/sa1: No such file or directory

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/sysstat/sysstat.inc
meta/recipes-extended/sysstat/sysstat/sysstat.service

index 5a7d2114cada39b6d2a17ef893ac578b282d59b7..9394090136343b17edf70e1573e1e95731e4655d 100644 (file)
@@ -49,7 +49,7 @@ do_install() {
                if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 'true', d)}; then
                        install -d ${D}${systemd_unitdir}/system
                        install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
-                       sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+                       sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
                fi
        fi
 }
@@ -62,6 +62,6 @@ pkg_postinst_${PN} () {
        fi
 }
 
-FILES_${PN} += "${libdir}/sa ${systemd_system_unitdir}"
+FILES_${PN} += "${systemd_system_unitdir}"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
index aff07109f547d501f38f6fd03fbd4529f1c35424..ca46befb996008c4f90fe1b82707ab25ed296806 100644 (file)
@@ -5,7 +5,7 @@ Description=Resets System Activity Logs
 Type=oneshot
 RemainAfterExit=yes
 User=root
-ExecStart=@LIBDIR@/sa/sa1 --boot
+ExecStart=@LIBEXECDIR@/sa/sa1 --boot
 
 [Install]
 WantedBy=multi-user.target