summaryrefslogtreecommitdiff
path: root/recipes-core/util-linux/util-linux_%.bbappend
blob: 61b8489ce77973f563ca2881ec56a61802c89eb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}