From dc1948ca134ae264d725540e44f715db4e9db085 Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Thu, 1 Apr 2021 19:51:52 +0500 Subject: [PATCH] Do not check for fuse2 when SUDO_MOUNT is enabled --- squashfs-start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/squashfs-start.sh b/squashfs-start.sh index 526bbe4..6b40384 100755 --- a/squashfs-start.sh +++ b/squashfs-start.sh @@ -26,7 +26,7 @@ export working_dir=/tmp/"$(basename "${script}")"_"${USER}"_${RANDOM} # a problem with mounting the squashfs image due to an incorrectly calculated offset. # The size of this script -scriptsize=13213 +scriptsize=13272 # The size of the utils.tar archive # utils.tar contains bwrap and squashfuse binaries @@ -102,12 +102,12 @@ elif [ "$1" = "-o" ]; then exit fi -# Check if FUSE2 is installed -if command -v fusermount 1>/dev/null; then - fmount=fusermount -else +# Check if FUSE2 is installed when SUDO_MOUNT is not enabled +if [ -z "${SUDO_MOUNT}" ] && ! command -v fusermount 1>/dev/null; then echo "Please install fuse2 and run the script again!" exit 1 +else + fmount=fusermount fi if [ -n "${BASE_DIR}" ]; then