summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-23 08:35:51 -0600
committerCraig Jennings <c@cjennings.net>2026-01-23 08:35:51 -0600
commit1365bd92213a0605d6b54a9fe04875f4df549356 (patch)
tree26bce7115da5604f07e2e62c6b857a1581098cc0 /archsetup
parent34737af104bf1a2a287e8a4650abd59e64294a3c (diff)
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
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup13
1 files 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
}