Skip to content

Commit c1c7887

Browse files
committed
feat: add auto-detection for Fedora distribution
Fedora uses non-standard paths and command names for GRUB (e.g., /boot/grub2 instead of /boot/grub, and grub2-mkconfig). This change adds a conditional block to detect Fedora via /etc/fedora-release and automatically sets the appropriate variables, improving the out-of-the-box experience for Fedora users.
1 parent 7e8a45c commit c1c7887

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎config‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33

44
GRUB_BTRFS_VERSION=4.13-yabsnap_info_support-2024-03-06T13:43:57+00:00
55

6+
# Distribution specific auto-detection (e.g. Fedora)
7+
if [ -f /etc/fedora-release ]; then
8+
GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"
9+
GRUB_BTRFS_GBTRFS_DIRNAME="/boot/grub2"
10+
GRUB_BTRFS_MKCONFIG="grub2-mkconfig"
11+
GRUB_BTRFS_SCRIPT_CHECK="grub2-script-check"
12+
fi
13+
614
# Disable grub-btrfs.
715
# Default: "false"
816
#GRUB_BTRFS_DISABLE="true"

‎temp/grub-btrfs.8‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ Default: “false”
102102
.IP \(em 4
103103
Example: \fCGRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="true"\fP
104104

105+
.SS "\GRUB_BTRFS_ENABLE_CRYPTODISK\fP"
106+
.PP
107+
Enable booting from snapshots stored on LUKS encrypted devices
108+
.IP \(em 4
109+
Default: “false”
110+
.IP \(em 4
111+
Example: \GRUB_BTRFS_ENABLE_CRYPTODISK="true"\fP
112+
105113
.SS "CUSTOM KERNELS"
106114
.SS "\fCGRUB_BTRFS_NKERNEL\fP / \fCGRUB_BTRFS_NINIT\fP / \fCGRUB_BTRFS_CUSTOM_MICROCODE\fP"
107115
.PP

0 commit comments

Comments
 (0)