mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-10-20 02:42:03 +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:
+1
-1
@@ -565,7 +565,7 @@ rm -f "$grub_directory/grub-btrfs.new"
|
|||||||
> "$grub_directory/grub-btrfs.new"
|
> "$grub_directory/grub-btrfs.new"
|
||||||
# Create mount point then mounting
|
# Create mount point then mounting
|
||||||
[[ ! -d $gbgmp ]] && mkdir -p "$gbgmp"
|
[[ ! -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
|
trap "unmount_gbgmp" EXIT # unmounting mount point on EXIT signal
|
||||||
# Count menuentries
|
# Count menuentries
|
||||||
count_warning_menuentries=0
|
count_warning_menuentries=0
|
||||||
|
|||||||
Reference in New Issue
Block a user