mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
sysstat: add systemd service files
Add sysstat.service to support systemd systems. (From OE-Core rev: 3278af2266a078351a4f614c79bfbea2514566a1) Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -6,15 +6,20 @@ SECTION = "console/utils"
|
||||
|
||||
SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
|
||||
file://99_sysstat \
|
||||
file://sysstat.service \
|
||||
"
|
||||
|
||||
DEPENDS += "base-passwd"
|
||||
|
||||
inherit autotools-brokensep gettext
|
||||
inherit autotools-brokensep gettext systemd
|
||||
|
||||
EXTRA_OECONF += "--disable-sensors"
|
||||
EXTRA_OEMAKE += 'LFLAGS=""'
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}"
|
||||
SYSTEMD_SERVICE_${PN} = "sysstat.service"
|
||||
SYSTEMD_AUTO_ENABLE = "enable"
|
||||
|
||||
do_configure_prepend() {
|
||||
export sa_lib_dir=${libdir}/sa
|
||||
}
|
||||
@@ -27,6 +32,10 @@ do_install() {
|
||||
rm -rf ${D}/var
|
||||
install -d ${D}/etc/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
pkg_postinst_${PN} () {
|
||||
|
||||
12
meta/recipes-extended/sysstat/sysstat/sysstat.service
Normal file
12
meta/recipes-extended/sysstat/sysstat/sysstat.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Resets System Activity Logs
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
User=root
|
||||
ExecStart=@LIBDIR@/sa/sa1 --boot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user