16c88e2a5a
When specifying 'clevis' command with no parameters, different options should be printed without message "Command 'clevis' is invalid" Resolves: rhbz#2080281 Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
26 lines
489 B
Diff
26 lines
489 B
Diff
--- clevis-18.ori/src/clevis 2021-04-15 13:00:19.965065700 +0200
|
|
+++ clevis-18/src/clevis 2022-06-20 14:29:50.148261656 +0200
|
|
@@ -27,6 +27,8 @@
|
|
}
|
|
|
|
cmd=clevis
|
|
+input_commands="$cmd $@"
|
|
+
|
|
while [ $# -gt 0 ]; do
|
|
[[ "$1" =~ ^- ]] && break
|
|
cmd="$cmd-$1"
|
|
@@ -36,8 +38,11 @@
|
|
done
|
|
|
|
exec >&2
|
|
-echo
|
|
-echo "Command '$cmd' is invalid"
|
|
+if [ "$cmd" != "clevis" ];
|
|
+then
|
|
+ echo
|
|
+ echo "Command '$input_commands' is invalid"
|
|
+fi
|
|
echo
|
|
echo "Usage: clevis COMMAND [OPTIONS]"
|
|
echo
|