mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-04 13:05:00 +08:00
Make name of "grub-script-check" configurable (#177)
41_snapshots-btrfs file:
* Remove "grub_script_check" variable
Config file;
* Make name of "grub-script-check" configurable
* Might be 'grub2-script-check' on some systems (Fedora ...)
This commit is contained in:
@@ -123,8 +123,6 @@ detect_rootflags()
|
||||
| sed -E 's/^.*[[:space:]]([[:graph:]]+)$/\1/;s/,?subvol(id)?=[^,$]+//g;s/^,//')
|
||||
rootflags="rootflags=${fstabflags:+$fstabflags,}${GRUB_BTRFS_ROOTFLAGS:+$GRUB_BTRFS_ROOTFLAGS,}"
|
||||
}
|
||||
## Path to grub-script-check
|
||||
grub_script_check="${bindir}/grub-script-check"
|
||||
|
||||
unmount_grub_btrfs_mount_point()
|
||||
{
|
||||
@@ -570,7 +568,7 @@ if [[ "${count_limit_snap}" = "0" || -z "${count_limit_snap}" ]]; then
|
||||
fi
|
||||
# Make a submenu in GRUB (grub.cfg) and move "grub-btrfs.new" to "grub-btrfs.cfg"
|
||||
header_menu
|
||||
if ${grub_script_check} "$grub_directory/grub-btrfs.new"; then
|
||||
if "${bindir}/${GRUB_BTRFS_SCRIPT_CHECK:-grub-script-check}" "$grub_directory/grub-btrfs.new"; then
|
||||
cat "$grub_directory/grub-btrfs.new" > "$grub_directory/grub-btrfs.cfg"
|
||||
rm -f "$grub_directory/grub-btrfs.new"
|
||||
cat << EOF
|
||||
|
||||
6
config
6
config
@@ -106,6 +106,12 @@ GRUB_BTRFS_IGNORE_PREFIX_PATH=("var/lib/docker" "@var/lib/docker" "@/var/lib/doc
|
||||
# Default: grub-mkconfig
|
||||
#GRUB_BTRFS_MKCONFIG=/usr/bin/grub2-mkconfig
|
||||
|
||||
# Name of grub-script-check command, use by "grub-btrfs"
|
||||
# Might be 'grub2-script-check' on some systems (Fedora ...)
|
||||
# For example, on Fedora : "grub2-script-check"
|
||||
# Default: grub-script-check
|
||||
#GRUB_BTRFS_SCRIPT_CHECK=grub2-script-check
|
||||
|
||||
# Password protection management for submenu,snapshots
|
||||
# Refer to the Grub documentation https://www.gnu.org/software/grub/manual/grub/grub.html#Authentication-and-authorisation
|
||||
# and this comment https://github.com/Antynea/grub-btrfs/issues/95#issuecomment-682295660
|
||||
|
||||
Reference in New Issue
Block a user