blob: e977942de87e732e9941be8e9177f953696f257c [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
Patrick Williams03514f12024-04-05 07:04:11 -050015RDEPENDS:${PN} = "util-linux-fcntl-lock"
16
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017INITSCRIPT_NAME = "run-postinsts"
18INITSCRIPT_PARAMS = "start 99 S ."
19
Patrick Williams213cb262021-08-07 19:21:33 -050020SYSTEMD_SERVICE:${PN} = "run-postinsts.service"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021
22do_configure() {
23 :
24}
25
26do_compile () {
27 :
28}
29
30do_install() {
31 install -d ${D}${sbindir}
32 install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/
33
34 install -d ${D}${sysconfdir}/init.d/
35 install -m 0755 ${WORKDIR}/run-postinsts.init ${D}${sysconfdir}/init.d/run-postinsts
36
Andrew Geissler5199d832021-09-24 16:47:35 -050037 install -d ${D}${systemd_system_unitdir}/
38 install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_system_unitdir}/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039
40 sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
41 -e 's:#SBINDIR#:${sbindir}:g' \
42 -e 's:#BASE_BINDIR#:${base_bindir}:g' \
43 -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \
44 ${D}${sbindir}/run-postinsts \
Andrew Geissler5199d832021-09-24 16:47:35 -050045 ${D}${systemd_system_unitdir}/run-postinsts.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046}