]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd-compat-units: run-postinsts fix script link
authorAndreas Müller <schnitzeltony@googlemail.com>
Wed, 16 Oct 2013 11:27:55 +0000 (13:27 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Dec 2013 16:53:02 +0000 (16:53 +0000)
in

commit fe039170236080291c0220476a5809774f82ee5c
Author: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Date:   Wed Oct 2 10:55:32 2013 +0000

    systemd-compat-units: Use correct run-postinsts script link

    OE-Core commit 75a14923da1ba91eddde47f0907345c19c82d6f0 has moved
    run-postinsts script execution from S98 to S99 in rcS.d. run-postinsts.service
    should check for this script and run it on first boot rather than
    S98run-postinsts, which is for opkg/dpkg.

the link was corrected but the mentioned commit is not available. Instead of
reverting, we use the same variable as opkg for init script ordering and drop
a note in case somebody wants to change default.

(From OE-Core master rev: 7aabc9408fb382f0ae39f9932b6d9ac391528b76)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-core/systemd/systemd-compat-units.bb
meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service
meta/recipes-devtools/opkg/opkg.inc

index c47c14bf957ae221f58a9009bcdbafd57aa69cbd..6eb5ffd985f4f4af02bae42a18aa789e397b66fb 100644 (file)
@@ -14,6 +14,8 @@ SRC_URI = "file://*.service"
 do_install() {
        install -d ${D}${systemd_unitdir}/system/basic.target.wants
        install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
+       sed -i -e 's,@POSTINSTALL_INITPOSITION@,${POSTINSTALL_INITPOSITION},g' \
+                       ${WORKDIR}/run-postinsts.service
        install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system
        ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/basic.target.wants/
        ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
@@ -53,4 +55,8 @@ pkg_postinst_${PN} () {
 FILES_${PN} = "${systemd_unitdir}/system ${bindir}"
 RDPEPENDS_${PN} = "systemd"
 
-
+# Define a variable to allow distros to run configure earlier.
+# (for example, to enable loading of ethernet kernel modules before networking starts)
+# note: modifying name or default value for POSTINSTALL_INITPOSITION requires
+# changes in opkg.inc
+POSTINSTALL_INITPOSITION ?= "98"
index 4ebc2344cfe96a070a08b6e4fcbbfae1d64d947d..35cf3d32de802c8ca86a6f8c7a9231287a7c3668 100644 (file)
@@ -1,12 +1,12 @@
 [Unit]
 Description=Run pending postinsts
 DefaultDependencies=no
-ConditionPathExists=|/etc/rcS.d/S99run-postinsts
+ConditionPathExists=|/etc/rcS.d/S@POSTINSTALL_INITPOSITION@run-postinsts
 After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
 Before=sysinit.target
 
 [Service]
-ExecStart=/etc/rcS.d/S99run-postinsts
+ExecStart=/etc/rcS.d/S@POSTINSTALL_INITPOSITION@run-postinsts
 RemainAfterExit=No
 Type=oneshot
 StandardOutput=syslog
index 3d568867d4b9468096ff8660b3d18443c35d8d41..78724f359bd01d9149a96a6b407ebdb3cf987844 100644 (file)
@@ -104,4 +104,6 @@ BBCLASSEXTEND = "native nativesdk"
 
 # Define a variable to allow distros to run configure earlier.
 # (for example, to enable loading of ethernet kernel modules before networking starts)
+# note: modifying name or default value for POSTINSTALL_INITPOSITION requires
+# changes in systemd-compat-units.bb
 POSTINSTALL_INITPOSITION ?= "98"