mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-04 13:05:00 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user