blob: 72ba8c02270a9d217f4f495b3084c80a1cf82105 [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"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004LICENSE = "MIT"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
7SRC_URI = "file://run-postinsts \
8 file://run-postinsts.init \
9 file://run-postinsts.service"
10
11S = "${WORKDIR}"
12
13inherit allarch systemd update-rc.d
14
15INITSCRIPT_NAME = "run-postinsts"
16INITSCRIPT_PARAMS = "start 99 S ."
17
Patrick Williams213cb262021-08-07 19:21:33 -050018SYSTEMD_SERVICE:${PN} = "run-postinsts.service"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019
20do_configure() {
21 :
22}
23
24do_compile () {
25 :
26}
27
28do_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
Andrew Geissler5199d832021-09-24 16:47:35 -050035 install -d ${D}${systemd_system_unitdir}/
36 install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_system_unitdir}/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
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 \
Andrew Geissler5199d832021-09-24 16:47:35 -050043 ${D}${systemd_system_unitdir}/run-postinsts.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044}