From 1365bd92213a0605d6b54a9fe04875f4df549356 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 23 Jan 2026 08:35:51 -0600 Subject: fix(archsetup): add btrfs detection, don't assume non-ZFS is btrfs - Add is_btrfs_root() function - Only install timeshift-autosnap and grub-btrfs on btrfs systems - Skip snapshot tools on ext4/other filesystems --- archsetup | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/archsetup b/archsetup index 1ccfcf4..4cc6199 100755 --- a/archsetup +++ b/archsetup @@ -384,6 +384,11 @@ is_zfs_root() { [ "$(findmnt -n -o FSTYPE /)" = "zfs" ] } +is_btrfs_root() { + # Returns 0 (true) if root filesystem is btrfs, 1 (false) otherwise + [ "$(findmnt -n -o FSTYPE /)" = "btrfs" ] +} + # Encryption Detection is_encrypted_root() { # Returns 0 (true) if root filesystem is on an encrypted volume @@ -1171,8 +1176,9 @@ EOF # systemctl enable --now zfs-replicate.timer display "task" "zfs-replicate timer created (enable after SSH key setup to TrueNAS)" - else - # Non-ZFS (btrfs): Install timeshift-autosnap + elif is_btrfs_root; then + # Btrfs: Install timeshift-autosnap and grub-btrfs + display "task" "btrfs detected - installing snapshot tools" aur_install timeshift-autosnap pacman_install grub-btrfs action="enabling snapshot boot menu updates" && display "task" "$action" @@ -1189,6 +1195,9 @@ EOF action="regenerating boot menu" && display "task" "$action" grub-mkconfig -o /boot/grub/grub.cfg >> "$logfile" 2>&1 || error "error" "$action" "$?" + else + # ext4 or other filesystem - no automatic snapshots + display "task" "ext4/other filesystem detected - skipping snapshot tools" fi } -- cgit v1.2.3