diff options
3 files changed, 38 insertions, 4 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init new file mode 100644 index 0000000000..473a1f7f6a --- /dev/null +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | run-postinsts | ||
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service new file mode 100644 index 0000000000..822327aadc --- /dev/null +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Run pending postinsts | ||
| 3 | DefaultDependencies=no | ||
| 4 | After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount | ||
| 5 | Before=sysinit.target | ||
| 6 | ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts | ||
| 7 | |||
| 8 | [Service] | ||
| 9 | Type=oneshot | ||
| 10 | ExecStart=#SBINDIR#/run-postinsts | ||
| 11 | ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service | ||
| 12 | RemainAfterExit=No | ||
| 13 | TimeoutSec=0 | ||
| 14 | |||
| 15 | [Install] | ||
| 16 | WantedBy=basic.target | ||
| 17 | WantedBy=sysinit.target | ||
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" | |||
| 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ |
| 6 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 6 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
| 7 | 7 | ||
| 8 | SRC_URI = "file://run-postinsts" | 8 | SRC_URI = "file://run-postinsts \ |
| 9 | file://run-postinsts.init \ | ||
| 10 | file://run-postinsts.service" | ||
| 11 | |||
| 12 | inherit allarch systemd update-rc.d | ||
| 9 | 13 | ||
| 10 | INITSCRIPT_NAME = "run-postinsts" | 14 | INITSCRIPT_NAME = "run-postinsts" |
| 11 | INITSCRIPT_PARAMS = "start 99 S ." | 15 | INITSCRIPT_PARAMS = "start 99 S ." |
| 12 | 16 | ||
| 13 | inherit update-rc.d | 17 | SYSTEMD_SERVICE_${PN} = "run-postinsts.service" |
| 14 | 18 | ||
| 15 | do_configure() { | 19 | do_configure() { |
| 16 | : | 20 | : |
| @@ -21,8 +25,18 @@ do_compile () { | |||
| 21 | } | 25 | } |
| 22 | 26 | ||
| 23 | do_install() { | 27 | do_install() { |
| 28 | install -d ${D}${sbindir} | ||
| 29 | install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/ | ||
| 30 | |||
| 24 | install -d ${D}${sysconfdir}/init.d/ | 31 | install -d ${D}${sysconfdir}/init.d/ |
| 25 | install -m 0755 ${WORKDIR}/run-postinsts ${D}${sysconfdir}/init.d/ | 32 | install -m 0755 ${WORKDIR}/run-postinsts.init ${D}${sysconfdir}/init.d/run-postinsts |
| 33 | |||
| 34 | install -d ${D}${systemd_unitdir}/system/ | ||
| 35 | install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system/ | ||
| 26 | 36 | ||
| 27 | sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' ${D}${sysconfdir}/init.d/run-postinsts | 37 | sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \ |
| 38 | -e 's:#SBINDIR#:${sbindir}:g' \ | ||
| 39 | -e 's:#BASE_BINDIR#:${base_bindir}:g' \ | ||
| 40 | ${D}${sbindir}/run-postinsts \ | ||
| 41 | ${D}${systemd_unitdir}/system/run-postinsts.service | ||
| 28 | } | 42 | } |
