From d45a6ce1086426b8af9bea13a295ea606f6d4e3f Mon Sep 17 00:00:00 2001 From: Reynegton Pinheiro Nunes Date: Thu, 7 May 2026 13:07:01 -0300 Subject: [PATCH] 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. --- config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config b/config index b2fc299..4aa836c 100644 --- a/config +++ b/config @@ -3,6 +3,14 @@ GRUB_BTRFS_VERSION=4.13-yabsnap_info_support-2024-03-06T13:43:57+00:00 +# Distribution specific auto-detection (e.g. Fedora) +if [ -f /etc/fedora-release ]; then + GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2" + GRUB_BTRFS_GBTRFS_DIRNAME="/boot/grub2" + GRUB_BTRFS_MKCONFIG="grub2-mkconfig" + GRUB_BTRFS_SCRIPT_CHECK="grub2-script-check" +fi + # Disable grub-btrfs. # Default: "false" #GRUB_BTRFS_DISABLE="true"