blob: 85b3fc867e3d24097fa9932b92ee15c6c945204b [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Runs postinstall scripts on first boot of the target device"
2SECTION = "devel"
Brad Bishop316dfdd2018-06-25 12:45:53 -04003PR = "r10"
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
18SYSTEMD_SERVICE_${PN} = "run-postinsts.service"
19
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
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}