summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-08 23:17:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-08 23:17:44 +0100
commit94e60a1affaaa4d74fa66618ca56ef360228a22b (patch)
tree5b9cf34eaaef3b211d6b9cf8c9f4ef670df2ff32
parent9bc2a9158b30cc217e93c85e72a62d164c3a9b73 (diff)
runsystem: Check that /servers/socket/1 is really set up
In case the image was built through a tarball, /servers/socket/1 might exist but not actually have been configured as pflocal translator. So better check that we do have a translator there, and fix it otherwise.
-rw-r--r--daemons/runsystem.hurd.sh.in2
-rw-r--r--daemons/runsystem.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/daemons/runsystem.hurd.sh.in b/daemons/runsystem.hurd.sh.in
index f4ed0a5a..3d5f1f28 100644
--- a/daemons/runsystem.hurd.sh.in
+++ b/daemons/runsystem.hurd.sh.in
@@ -63,7 +63,7 @@ echo
#
# 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 && command -v settrans >/dev/null ; then
+if ! test -c /servers/socket/1 && command -v settrans >/dev/null ; then
# The root filesystem should be read-only at this point.
if fsysopts / --update --writable ; then
settrans -c /servers/socket/1 /hurd/pflocal
diff --git a/daemons/runsystem.sh b/daemons/runsystem.sh
index 4894f70b..9698ff2a 100644
--- a/daemons/runsystem.sh
+++ b/daemons/runsystem.sh
@@ -60,7 +60,7 @@ echo
#
# 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 && command -v settrans >/dev/null ; then
+if ! test -c /servers/socket/1 && command -v settrans >/dev/null ; then
# The root filesystem should be read-only at this point.
if fsysopts / --update --writable ; then
settrans -c /servers/socket/1 /hurd/pflocal