Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Runs postinstall scripts on first boot of the target device" |
| 2 | SECTION = "devel" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 3 | PR = "r10" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | LICENSE = "MIT" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
| 7 | SRC_URI = "file://run-postinsts \ |
| 8 | file://run-postinsts.init \ |
| 9 | file://run-postinsts.service" |
| 10 | |
| 11 | S = "${WORKDIR}" |
| 12 | |
| 13 | inherit allarch systemd update-rc.d |
| 14 | |
| 15 | INITSCRIPT_NAME = "run-postinsts" |
| 16 | INITSCRIPT_PARAMS = "start 99 S ." |
| 17 | |
| 18 | SYSTEMD_SERVICE_${PN} = "run-postinsts.service" |
| 19 | |
| 20 | do_configure() { |
| 21 | : |
| 22 | } |
| 23 | |
| 24 | do_compile () { |
| 25 | : |
| 26 | } |
| 27 | |
| 28 | do_install() { |
| 29 | install -d ${D}${sbindir} |
| 30 | install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/ |
| 31 | |
| 32 | install -d ${D}${sysconfdir}/init.d/ |
| 33 | install -m 0755 ${WORKDIR}/run-postinsts.init ${D}${sysconfdir}/init.d/run-postinsts |
| 34 | |
| 35 | install -d ${D}${systemd_unitdir}/system/ |
| 36 | install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system/ |
| 37 | |
| 38 | sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \ |
| 39 | -e 's:#SBINDIR#:${sbindir}:g' \ |
| 40 | -e 's:#BASE_BINDIR#:${base_bindir}:g' \ |
| 41 | -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \ |
| 42 | ${D}${sbindir}/run-postinsts \ |
| 43 | ${D}${systemd_unitdir}/system/run-postinsts.service |
| 44 | } |