X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=check-subvol-stale;h=dcc0535e6df227cc3b5b03f56a8a543b8df4eeb3;hb=a7f9b883055cb1c4056469d498c7bc6564670c37;hp=99594213a6fa4405ae8f74df837bbae7324b4f84;hpb=565857e91b7e8c671ec3f4314cb21b0a85c01d0f;p=distro-setup diff --git a/check-subvol-stale b/check-subvol-stale index 9959421..dcc0535 100644 --- a/check-subvol-stale +++ b/check-subvol-stale @@ -25,10 +25,10 @@ usage() { cat < $stale_file - ret=1 else rm -f $stale_file fi @@ -79,7 +78,6 @@ d() { fi } -ret=0 for d; do vol=${d##*/} # second field, non-comment line == $d @@ -134,9 +132,8 @@ for d; do ) if [[ ! $last_snap ]]; then # should not happen. - echo "$0: error: could not find latest snapshot for $svp among ${snaps[*]}" - ret=1 - continue + echo "$0: error: could not find latest snapshot for $svp among ${snaps[*]}" >&2 + exit 1 fi if [[ ! -e $svp ]]; then @@ -181,6 +178,4 @@ for d; do fi stale-file - done -exit $ret