From bab78d4ed84b2dd37c809c678d9824f80796a17a Mon Sep 17 00:00:00 2001 From: Antynea Date: Fri, 24 Sep 2021 12:24:15 +0200 Subject: [PATCH] Write-protect user data * Write-protect user data * The script does not need write access to the data. Adds "ro" flags to provide protection against accidental writing. --- 41_snapshots-btrfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index f58f8f2..abf7be5 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -565,7 +565,7 @@ rm -f "$grub_directory/grub-btrfs.new" > "$grub_directory/grub-btrfs.new" # Create mount point then mounting [[ ! -d $gbgmp ]] && mkdir -p "$gbgmp" -mount -o subvolid=5 /dev/disk/by-uuid/"$root_uuid" "$gbgmp/" +mount -o ro,subvolid=5 /dev/disk/by-uuid/"$root_uuid" "$gbgmp/" trap "unmount_gbgmp" EXIT # unmounting mount point on EXIT signal # Count menuentries count_warning_menuentries=0