summaryrefslogtreecommitdiffstats
path: root/projectroot
diff options
context:
space:
mode:
authorJuergen Borleis <jbe@pengutronix.de>2016-07-28 16:13:30 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-08-15 10:01:26 +0200
commite3c6246cf1e205c186ed6a6c2ff0074bdf0a1515 (patch)
tree005b60cd6f60b22017caf1b5669cd040beddf76a /projectroot
parentc7a9be14b6aa864b4edbdbc2e556f31229f021d7 (diff)
downloadptxdist-e3c6246cf1e205c186ed6a6c2ff0074bdf0a1515.tar.gz
ptxdist-e3c6246cf1e205c186ed6a6c2ff0074bdf0a1515.tar.xz
rc-once/systemd: fall back to the rescue boot-target if rc-once fails to remount RW
In cases where the root filesystem medium has some kind of external write protection (like an SD card has), remounting the root filesystem read-write fails and the system seems frozen, because systemd never starts any log-in console. This change forces the rescue target for this special case. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'projectroot')
-rw-r--r--projectroot/lib/systemd/systemd-rc-once5
1 files changed, 4 insertions, 1 deletions
diff --git a/projectroot/lib/systemd/systemd-rc-once b/projectroot/lib/systemd/systemd-rc-once
index 98b089185..ff7f7d3dc 100644
--- a/projectroot/lib/systemd/systemd-rc-once
+++ b/projectroot/lib/systemd/systemd-rc-once
@@ -4,7 +4,10 @@
. /lib/init/rc-once.sh
start() {
- mount_root_rw || exit 1
+ if ! mount_root_rw; then
+ systemctl rescue
+ exit 1
+ fi
if run_rc_once; then
rm -f /system-update
fi