aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units.bb8
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service4
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc2
3 files changed, 11 insertions, 3 deletions
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index c47c14bf95..6eb5ffd985 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -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"
diff --git a/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service b/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service
index 4ebc2344cf..35cf3d32de 100644
--- a/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service
+++ b/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service
@@ -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
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index ec0771635f..fb99fb5076 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -105,4 +105,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"