Add returncode
This commit is contained in:
parent
2d18b32051
commit
4b23888a13
@ -16,6 +16,7 @@ wc=$(which wc)
|
|||||||
tr=$(which tr)
|
tr=$(which tr)
|
||||||
sed=$(which sed)
|
sed=$(which sed)
|
||||||
zfs_auto_snapshot=$(which zfs-auto-snapshot)
|
zfs_auto_snapshot=$(which zfs-auto-snapshot)
|
||||||
|
rc=0
|
||||||
debug=
|
debug=
|
||||||
|
|
||||||
#### default config file, can be changed with parameter -c
|
#### default config file, can be changed with parameter -c
|
||||||
@ -213,6 +214,7 @@ for name in "${syncvols[@]}"; do
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
log "[ERROR] No snapshot found on $target/$name to add incremental snapshots to. The target dataset (with all children) needs to be deleted and recreated via replication."
|
log "[ERROR] No snapshot found on $target/$name to add incremental snapshots to. The target dataset (with all children) needs to be deleted and recreated via replication."
|
||||||
|
if [ $rc -eq 0 ]; then rc=1; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $debug == "-v" ]]; then log "[DEBUG] $name - Start deletion of old snapshots"; fi
|
if [[ $debug == "-v" ]]; then log "[DEBUG] $name - Start deletion of old snapshots"; fi
|
||||||
@ -241,3 +243,4 @@ for name in "${syncvols[@]}"; do
|
|||||||
if [[ $debug == "-v" ]]; then log "[DEBUG] $name - No snapshots found with filter $snapshot_filter"; fi
|
if [[ $debug == "-v" ]]; then log "[DEBUG] $name - No snapshots found with filter $snapshot_filter"; fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
exit $rc
|
Loading…
Reference in New Issue
Block a user