From 7e8a45ca9cdd53751b5fae976c57df5a9e98fee9 Mon Sep 17 00:00:00 2001 From: Jalopy <169272449+PapiJalopy@users.noreply.github.com> Date: Thu, 19 Feb 2026 00:21:08 -0800 Subject: [PATCH] Fix boot_uuid_subvolume fallback (#415) Fix regression affecting systems where boot directory is not a Btrfs subvolume. --- 41_snapshots-btrfs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index ecbd2fe..58a6cac 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -136,9 +136,11 @@ fi [ -z "$boot_uuid" ] && print_error "Cannot determine UUID of ${boot_device}" # If /boot is not a Btrfs subvolume, reuse root subvol UUID -boot_uuid_subvolume="$(btrfs subvolume show "${boot_directory}" 2>/dev/null | \ - awk -F':' '/^\s*UUID/ {gsub(/^[ \t]+/, "", $2); print $2}')" \ - || boot_uuid_subvolume="UUID: $root_uuid_subvolume" +boot_uuid_subvolume="$( + btrfs subvolume show "${boot_directory}" 2>/dev/null | \ + awk -F':' '/^\s*UUID/ {gsub(/^[ \t]+/, "", $2); print $2; exit}' +)" +[ -z "$boot_uuid_subvolume" ] && boot_uuid_subvolume="$root_uuid_subvolume" # Extra data for GRUB commands boot_hs="$(${grub_probe} --device "${boot_device}" --target=hints_string 2>/dev/null)"