aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xspectre-meltdown-checker.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index 60af68d..c0a5eba 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -244,6 +244,13 @@ while [ -n "$1" ]; do
shift
case "$1" in
text|nrpe) opt_batch_format="$1"; shift;;
+ --*) ;; # allow subsequent flags
+ '') ;; # allow nothing at all
+ *)
+ echo "$0: error: unknown batch format '$1'"
+ echo "$0: error: --batch expects a format from: text, nrpe"
+ exit 1 >&2
+ ;;
esac
elif [ "$1" = "-v" -o "$1" = "--verbose" ]; then
opt_verbose=$(expr $opt_verbose + 1)