From c80032179ca00694a70ff71aa5cd0db14a8a45e2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 6 Feb 2019 02:40:07 +0000 Subject: Make all commands return 2 in case of a usage error Signed-off-by: Ben Hutchings --- lsinitramfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lsinitramfs') diff --git a/lsinitramfs b/lsinitramfs index 1235e4d..f86ad9c 100755 --- a/lsinitramfs +++ b/lsinitramfs @@ -9,7 +9,7 @@ usage() if [ "$#" -eq 0 ] ; then usage >&2 - exit 1 + exit 2 fi umi_opts="--list" @@ -17,7 +17,7 @@ umi_opts="--list" OPTIONS=$(getopt -o hl --long help,long -n "$0" -- "$@") # Check for non-GNU getopt # shellcheck disable=SC2181 -if [ $? != 0 ] ; then echo "W: non-GNU getopt" >&2 ; exit 1 ; fi +if [ $? != 0 ] ; then echo "W: non-GNU getopt" >&2 ; exit 2 ; fi eval set -- "$OPTIONS" -- cgit v1.2.3