[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] daemons: make sure / is writable before setting up pflocal
From: |
Justus Winter |
Subject: |
[PATCH 1/5] daemons: make sure / is writable before setting up pflocal |
Date: |
Thu, 19 Sep 2013 11:12:45 +0200 |
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.
---
daemons/runsystem.sh | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/daemons/runsystem.sh b/daemons/runsystem.sh
index 4b9334e..f4f2771 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
--
1.7.10.4
- [PATCH 1/5] daemons: make sure / is writable before setting up pflocal,
Justus Winter <=
[PATCH 3/5] sutils: set up /dev/null using /bin/nullpriv in MAKEDEV.sh, Justus Winter, 2013/09/19
[PATCH 5/5] hurd: add _reply suffix to the routines in fsys_reply.defs, Justus Winter, 2013/09/19
[PATCH 4/5] hurd: add _reply suffix to the routines in process_reply.defs, Justus Winter, 2013/09/19