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/
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"
[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
# 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"