blob: db353d607b4f3d4e5f518ef5dff69c59d0a1f15f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Runs postinstall scripts on first boot of the target device"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "${SUMMARY}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003SECTION = "devel"
Brad Bishop316dfdd2018-06-25 12:45:53 -04004PR = "r10"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005LICENSE = "MIT"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
8SRC_URI = "file://run-postinsts \
9 file://run-postinsts.init \
10 file://run-postinsts.service"
11
12S = "${WORKDIR}"
13
14inherit allarch systemd update-rc.d
15
16INITSCRIPT_NAME = "run-postinsts"
17INITSCRIPT_PARAMS = "start 99 S ."
18
Patrick Williams213cb262021-08-07 19:21:33 -050019SYSTEMD_SERVICE:${PN} = "run-postinsts.service"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
21do_configure() {
22 :
23}
24
25do_compile () {
26 :
27}
28
29do_install() {
30 install -d ${D}${sbindir}
31 install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/
32
33 install -d ${D}${sysconfdir}/init.d/
34 install -m 0755 ${WORKDIR}/run-postinsts.init ${D}${sysconfdir}/init.d/run-postinsts
35
Andrew Geissler5199d832021-09-24 16:47:35 -050036 install -d ${D}${systemd_system_unitdir}/
37 install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_system_unitdir}/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038
39 sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
40 -e 's:#SBINDIR#:${sbindir}:g' \
41 -e 's:#BASE_BINDIR#:${base_bindir}:g' \
42 -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \
43 ${D}${sbindir}/run-postinsts \
Andrew Geissler5199d832021-09-24 16:47:35 -050044 ${D}${systemd_system_unitdir}/run-postinsts.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045}