mirror of
https://github.com/bashclub/zfs-housekeeping.git
synced 2024-12-25 15:10:13 +01:00
Update sts23.sh
Freebsd kompatibler zfs list aufruf
This commit is contained in:
parent
13402961d8
commit
bb39b10719
12
sts23.sh
12
sts23.sh
@ -16,9 +16,9 @@ FILTER="$2"
|
|||||||
# Wieviele behalten
|
# Wieviele behalten
|
||||||
BEHALTE="$3"
|
BEHALTE="$3"
|
||||||
|
|
||||||
[ $BEHALTE -gt 0 ] 2>/dev/null
|
[ $BEHALTE -ge 0 ] 2>/dev/null
|
||||||
if [ "$?" != "0" ]
|
if [ "$?" != "0" ]
|
||||||
then
|
then
|
||||||
echo "Parameter 3 keine pos. Zahl"
|
echo "Parameter 3 keine pos. Zahl"
|
||||||
echo "$AUFRUF"
|
echo "$AUFRUF"
|
||||||
exit 0
|
exit 0
|
||||||
@ -40,9 +40,9 @@ do
|
|||||||
|
|
||||||
if [ "$MUSTER" = "" ]
|
if [ "$MUSTER" = "" ]
|
||||||
then
|
then
|
||||||
SNAPS=$(zfs list -t snap -H -o name -s creation "${DATASET}")
|
SNAPS=$(zfs list -r -t snap -H -o name -s creation|grep "${DATASET}@")
|
||||||
else
|
else
|
||||||
SNAPS=$(zfs list -t snap -H -o name -s creation "${DATASET}"|grep $MUSTER)
|
SNAPS=$(zfs list -r -t snap -H -o name -s creation|grep "${DATASET}@"|grep $MUSTER)
|
||||||
fi
|
fi
|
||||||
ANZSNAPS=$(echo $SNAPS|wc -w)
|
ANZSNAPS=$(echo $SNAPS|wc -w)
|
||||||
|
|
||||||
@ -77,9 +77,9 @@ do
|
|||||||
echo "# Liste nach zfs destroy"
|
echo "# Liste nach zfs destroy"
|
||||||
if [ "$MUSTER" = "" ]
|
if [ "$MUSTER" = "" ]
|
||||||
then
|
then
|
||||||
zfs list -t snap -o name -s creation "${DATASET}"
|
zfs list -r -t snap -o name -s creation|grep "${DATASET}@"
|
||||||
else
|
else
|
||||||
zfs list -t snap -o name -s creation "${DATASET}"|grep $MUSTER
|
zfs list -r -t snap -o name -s creation|grep "${DATASET}@"|grep $MUSTER
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "# Test - folgende zfs destroys würden ausgführt"
|
echo "# Test - folgende zfs destroys würden ausgführt"
|
||||||
|
Loading…
Reference in New Issue
Block a user