diff options
Diffstat (limited to 'archsetup')
| -rwxr-xr-x | archsetup | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 } |
