From 25fff397b1a0a6d51291bc4904ebac72ec4c87cb Mon Sep 17 00:00:00 2001 From: Manuel Date: Thu, 6 Jul 2023 08:22:20 +0200 Subject: [PATCH] Fix chroot setup script --- prepare-chroot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prepare-chroot.sh b/prepare-chroot.sh index b307ece..029b167 100755 --- a/prepare-chroot.sh +++ b/prepare-chroot.sh @@ -9,6 +9,7 @@ sudo -v || exit 1 arch-nspawn "$CHROOT/root" pacman -Syu mkdir -p -m 0755 "$CHROOT/$USER" -[ ! $(mountpoint -q "$CHROOT/$USER") ] && sudo mount -t tmpfs -o defaults,nodev,mode=0755,uid=$(id -u),gid=$(id -g) tmpfs "$CHROOT/$USER" +mountpoint -q "$CHROOT/$USER" +test $? -ne 0 && sudo mount -t tmpfs -o defaults,nodev,mode=0755,uid=$(id -u),gid=$(id -g) tmpfs "$CHROOT/$USER" exit 0