btrfs mounts should not fail the initial startup (#2611)

Signed-off-by: Simon L <szaimen@e.mail.de>
Co-authored-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
Simon L 2024-01-14 11:54:35 +01:00 committed by GitHub
parent 82c47946d7
commit 36be44643b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,7 +164,7 @@ If you want to cancel, type 'exit' and press [ENTER].")
then
msg_box "The directory isn't allowed to start with '/mnt/smbshares'"
else
echo "UUID=$UUID $MOUNT_PATH btrfs defaults 0 0" >> /etc/fstab
echo "UUID=$UUID $MOUNT_PATH btrfs defaults,nofail 0 0" >> /etc/fstab
mkdir -p "$MOUNT_PATH"
if ! mount "$MOUNT_PATH"
then
@ -313,7 +313,7 @@ fi
# Execute the change to a backup drive
print_text_in_color "$ICyan" "Adjusting permissions..."
sed -i "/$UUID/s/defaults/defaults,noauto/" /etc/fstab
sed -i "/$UUID/s/defaults,nofail/defaults,noauto/" /etc/fstab
chown -R root:root "$MOUNT_PATH"
chmod -R 600 "$MOUNT_PATH"
umount "$MOUNT_PATH"