From 4ecee0bd7785f3132c85a1de2ef7ab6e7da955c2 Mon Sep 17 00:00:00 2001 From: Denys Drozdov Date: Wed, 21 Jul 2021 18:16:33 +0300 Subject: util-linux: add separate bbappend to support fstrim service fstrim.service is disabled by default in openembedded-core layer. Add bbappend file to support fstrim.service for systemd Related-to: ELB-2356 Signed-off-by: Denys Drozdov --- recipes-core/util-linux/util-linux_%.bbappend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes-core/util-linux/util-linux_%.bbappend (limited to 'recipes-core/util-linux/util-linux_%.bbappend') diff --git a/recipes-core/util-linux/util-linux_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 0000000..341efcf --- /dev/null +++ b/recipes-core/util-linux/util-linux_%.bbappend @@ -0,0 +1,18 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI_append_ = " file://fstrim.service file://fstrim.timer" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "fstrim.service fstrim.timer" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/fstrim.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/fstrim.timer ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/*.service +} + -- cgit v1.2.3