From 8054f60a3c798d791be0c6d66fed2b38c2ff59c5 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sat, 25 Dec 2021 20:17:47 +0200 Subject: [PATCH] Use existing mounts in sysc when available This would be the case when bubblewrap is used for sandboxing the bootstrap. --- sysc/run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysc/run.sh b/sysc/run.sh index c8fe16e..0389a8b 100755 --- a/sysc/run.sh +++ b/sysc/run.sh @@ -18,11 +18,11 @@ create_fhs() { for d in bin lib sbin; do ln -s "usr/${d}" "/${d}" done - mkdir -p /etc /proc /run /sys /tmp /var - mount -t proc proc /proc - mount -t sysfs sysfs /sys + mkdir -p /etc /run /var + test -d /proc || (mkdir /proc && mount -t proc proc /proc) + test -d /sys || (mkdir /sys && mount -t sysfs sysfs /sys) # Make /tmp a ramdisk (speeds up configure etc significantly) - mount -t tmpfs tmpfs /tmp + test -d /tmp || (mkdir /tmp && mount -t tmpfs tmpfs /tmp) } populate_device_nodes ""