summaryrefslogtreecommitdiff
path: root/lsinitramfs
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-02-06 02:40:07 +0000
committerBen Hutchings <ben@decadent.org.uk>2019-02-06 03:35:56 +0000
commitc80032179ca00694a70ff71aa5cd0db14a8a45e2 (patch)
tree6b15e34d730d7776dc3c7164c48ca3ba6287d87c /lsinitramfs
parentccf07ee2f187ad3e7a538d468469772bf536ef99 (diff)
Make all commands return 2 in case of a usage error
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'lsinitramfs')
-rwxr-xr-xlsinitramfs4
1 files changed, 2 insertions, 2 deletions
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"