summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}