diff options
author | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-02-15 16:34:51 +0100 |
---|---|---|
committer | ronan Le Martret <ronan@iot.bzh> | 2017-02-17 10:19:03 +0000 |
commit | 4ab8673b6a9ef67c377e36c811329725c9873fb8 (patch) | |
tree | 1afad5e2519641296ffe49088d1ddcd9c6446517 /meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb | |
parent | 0189ad4446fac4da23544520e295ade4511a1860 (diff) |
Added first boot service for AGL
* Allow script execution at the end of the boot.
* Yocto first boot service is install at for "sysinit.target" level.
AGL need to have a custom service, exec when target service system,
(SYSTEMD_SERVICE_AFTER), is up.
* All script inside directory "/etc/agl-postinsts" will be exec at
the first boot.
* After the first boot the service "run-agl-postinsts.service"
is disable.
Change-Id: Ib12b7e11b451b4a41c4a31f5cda3686679fe9c08
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
(cherry picked from commit 67f1d7f631f20dfb4be3765ec32dfcd237d649c5)
Diffstat (limited to 'meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb')
-rw-r--r-- | meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb new file mode 100644 index 000000000..5b5e18a99 --- /dev/null +++ b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb @@ -0,0 +1,44 @@ +SUMMARY = "Runs AGL postinstall scripts on first boot of the target device" +SECTION = "devel" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://run-agl-postinsts \ + file://run-agl-postinsts.service" + +S = "${WORKDIR}" + +inherit allarch systemd + +SYSTEMD_SERVICE_${PN} = "run-agl-postinsts.service" + +SYSTEMD_SERVICE_AFTER ?= "dbus.service cynara.service" + +do_configure() { + : +} + +do_compile () { + : +} + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/run-agl-postinsts ${D}${sbindir}/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/run-agl-postinsts.service ${D}${systemd_unitdir}/system/ + + sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \ + -e 's:#SBINDIR#:${sbindir}:g' \ + -e 's:#BASE_BINDIR#:${base_bindir}:g' \ + -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \ + ${D}${sbindir}/run-agl-postinsts \ + ${D}${systemd_unitdir}/system/run-agl-postinsts.service + + sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \ + ${D}${systemd_unitdir}/system/run-agl-postinsts.service +} + |