aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb')
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb22
1 files changed, 18 insertions, 4 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 03989ab536..64f85c262d 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -5,12 +5,16 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-SRC_URI = "file://run-postinsts"
+SRC_URI = "file://run-postinsts \
+ file://run-postinsts.init \
+ file://run-postinsts.service"
+
+inherit allarch systemd update-rc.d
INITSCRIPT_NAME = "run-postinsts"
INITSCRIPT_PARAMS = "start 99 S ."
-inherit update-rc.d
+SYSTEMD_SERVICE_${PN} = "run-postinsts.service"
do_configure() {
:
@@ -21,8 +25,18 @@ do_compile () {
}
do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/
+
install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/run-postinsts ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/run-postinsts.init ${D}${sysconfdir}/init.d/run-postinsts
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system/
- sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' ${D}${sysconfdir}/init.d/run-postinsts
+ sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
+ -e 's:#SBINDIR#:${sbindir}:g' \
+ -e 's:#BASE_BINDIR#:${base_bindir}:g' \
+ ${D}${sbindir}/run-postinsts \
+ ${D}${systemd_unitdir}/system/run-postinsts.service
}