summaryrefslogtreecommitdiffstats
path: root/projectroot
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-09-21 00:15:20 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-21 10:21:31 +0200
commitb0da94af7f1516cc277d5baa006167b00c47e9d0 (patch)
tree8d6b26efc9d8b51117b82de34075c617763aa202 /projectroot
parentb48c132856f72f3446abfd6bf5873d2bd29f4a1c (diff)
downloadptxdist-b0da94af7f1516cc277d5baa006167b00c47e9d0.tar.gz
ptxdist-b0da94af7f1516cc277d5baa006167b00c47e9d0.tar.xz
rc-once: cleanup ordering
Update the dependencies according to the specification in systemd.offline-updates(7). Run systemctl in non-blocking mode. Otherwice rc-once will remain active until the transition is complete. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'projectroot')
-rw-r--r--projectroot/usr/lib/systemd/system/rc-once.service8
-rw-r--r--projectroot/usr/lib/systemd/systemd-rc-once8
2 files changed, 7 insertions, 9 deletions
diff --git a/projectroot/usr/lib/systemd/system/rc-once.service b/projectroot/usr/lib/systemd/system/rc-once.service
index 78f6f4c48..8f10d2b39 100644
--- a/projectroot/usr/lib/systemd/system/rc-once.service
+++ b/projectroot/usr/lib/systemd/system/rc-once.service
@@ -2,14 +2,12 @@
Description=First boot services
DefaultDependencies=no
IgnoreOnIsolate=true
-After=local-fs.target
-Requires=local-fs.target
-Before=system-update-cleanup.service
-After=system-update.target
+Requires=sysinit.target
+After=sysinit.target system-update-pre.target
+Before=system-update.target
[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/lib/systemd/systemd-rc-once
StandardOutput=syslog+console
-
diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
index 2b9850d37..e14936e40 100644
--- a/projectroot/usr/lib/systemd/systemd-rc-once
+++ b/projectroot/usr/lib/systemd/systemd-rc-once
@@ -5,7 +5,7 @@
start() {
if ! mount_root_rw; then
- systemctl rescue
+ systemctl --no-block rescue
exit 1
fi
if run_rc_once; then
@@ -25,12 +25,12 @@ umount() {
# remounting rw/ro during the second boot will flush anything
# left in the filesystem journal
ln -sf /etc/rc.once.d /system-update
- systemctl reboot
+ systemctl --no-block reboot
else
if [ -e /system-update ]; then
- systemctl rescue
+ systemctl --no-block rescue
else
- systemctl default
+ systemctl --no-block default
fi
fi
}