Mount the squashfs image as read-only

Even thouh squashfs is read-only anyway (even when mounted as read-write), it's still better to mount as read-only to avoid the "Text file busy" error.
This commit is contained in:
Kron4ek 2021-04-02 16:08:01 +05:00 committed by GitHub
parent 8e6e07c423
commit 7c4610e028
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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=13272
scriptsize=13275
# The size of the utils.tar archive
# utils.tar contains bwrap and squashfuse binaries
@ -344,7 +344,7 @@ fi
# Mount boostrap image
mkdir -p "${working_dir}"/mnt
if ${sudo_mount} "${sfuse}" -o offset="${offset}" "${script}" "${working_dir}"/mnt ; then
if ${sudo_mount} "${sfuse}" -o offset="${offset}",ro "${script}" "${working_dir}"/mnt ; then
echo "Running Conty"
if [ -n "${NVIDIA_FIX}" ]; then