diff --git a/upsnapz.sh b/upsnapz.sh index 2358dc5..7149ffc 100755 --- a/upsnapz.sh +++ b/upsnapz.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Time-stamp: <2025-02-26 08:02:52 nomad> +# Time-stamp: <2025-02-26 11:02:08 nomad> # Michel Le Cocq # @@ -89,7 +89,7 @@ function cleansnap printf '\nClean snapshot.\n' printf 'Current available bootfs:\n' - zfs list -o name,used,usedbysnapshots -r zroot/ROOT -s creation | grep -v '^zroot/ROOT .*' + showsnap oldest=$(zfs list -H -o name -r zroot/ROOT -s creation | grep -v '^zroot/ROOT$' | head -n 1) oldestdate=$(echo $oldest | cut -d "_" -f 3- | tr '_' '-') current=$(zpool get -H bootfs zroot -o value)