summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-09-19 11:12:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-09-19 23:30:07 +0200
commit4543e17766d1cc566b8f4dcbb7a4e5eb0f9a3f57 (patch)
tree56ae6610cc927fbec82a271719c97e2e212d0a79 /daemons
parent0adc5f281842de582609133a5cb16817e40cfe4e (diff)
daemons: make sure / is writable before setting up pflocal
runsystem.sh checks whether /servers/socket/1 exists and creates it using settrans -c if it does not. But at this point in the boot the root filesystem is normally not writable. This patch fixes this. * daemons/runsystem.sh: Make sure / is writable before attempting to set up pflocal.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/runsystem.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/daemons/runsystem.sh b/daemons/runsystem.sh
index 4b9334e3..f4f27711 100644
--- a/daemons/runsystem.sh
+++ b/daemons/runsystem.sh
@@ -55,10 +55,17 @@ function singleuser ()
}
-# See whether pflocal is setup already, and do so if not (install case)
-
-if ! test -e /servers/socket/1 && which settrans >/dev/null ; then
- settrans -c /servers/socket/1 /hurd/pflocal
+# See whether pflocal is set up already, and do so if not (install case)
+#
+# Normally this should be the case, but we better make sure since
+# without the pflocal server, pipe(2) does not work.
+if ! test -e /servers/socket/1 ; then
+ # The root filesystem should be read-only at this point.
+ if fsysopts / --update --writable ; then
+ settrans -c /servers/socket/1 /hurd/pflocal
+ else
+ singleuser "Failed to create /servers/socket/1."
+ fi
fi
# We expect to be started by console-run, which gives us no arguments and