From: Antonio Huete Jimenez Date: Thu, 13 Mar 2014 09:25:56 +0000 (+0100) Subject: tools - Fix return code in hammer-backup.sh X-Git-Tag: v3.9.0~340 X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/8ea841a62aada2f9680cca4287f1537109f020fb tools - Fix return code in hammer-backup.sh - When requesting help with '-h', exit with return code 0. Submitted-by: Freddy DISSAUX --- diff --git a/tools/tools/hammer-backup/hammer-backup.sh b/tools/tools/hammer-backup/hammer-backup.sh index cd56b2e2f4..8fe0b2f756 100755 --- a/tools/tools/hammer-backup/hammer-backup.sh +++ b/tools/tools/hammer-backup/hammer-backup.sh @@ -82,9 +82,10 @@ err() usage() { + exitval=${1:-1} echo "Usage: ${SCRIPTNAME} [-hlvfk] [-i ]" \ "[-c ] -d [] [pfs path]" - exit 1 + exit $exitval } check_pfs() @@ -439,7 +440,7 @@ do verbose=1 ;; h) - usage + usage 0 ;; *) usage