From 1c1e1fc501d745c8148f6daea8f093106083cc8c Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 26 Feb 2025 11:03:46 +0100 Subject: [PATCH] rajout appel de la fonction showsnap --- upsnapz.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)