Avoid invalid message for clevis command
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>
This commit is contained in:
parent
c157417ffd
commit
16c88e2a5a
25
0007-avoid-clevis-invalid-msg.patch
Normal file
25
0007-avoid-clevis-invalid-msg.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- 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
|
@ -1,6 +1,6 @@
|
||||
Name: clevis
|
||||
Version: 18
|
||||
Release: 102%{?dist}
|
||||
Release: 103%{?dist}
|
||||
Summary: Automated decryption framework
|
||||
|
||||
License: GPLv3+
|
||||
@ -13,6 +13,7 @@ Patch0002: 0002-systemd-account-for-unlocking-failures-in-clevis-luk.patch
|
||||
Patch0004: 0004-luks-explicitly-specify-pbkdf-iterations-to-cryptset.patch
|
||||
Patch0005: 0005-tang-dump-url-on-error-communication.patch
|
||||
Patch0006: 0006-feat-rename-the-test-pin-to-null-pin.patch
|
||||
Patch0007: 0007-avoid-clevis-invalid-msg.patch
|
||||
|
||||
BuildRequires: git-core
|
||||
BuildRequires: gcc
|
||||
@ -200,6 +201,10 @@ exit 0
|
||||
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
|
||||
|
||||
%changelog
|
||||
* Mon Jun 20 2022 Sergio Arroutbi <sarroutb@redhat.com> - 18-103
|
||||
- Avoid invalid message for clevis command
|
||||
Resolves: rhbz#2080281
|
||||
|
||||
* Wed Jan 26 2022 Sergio Correia <scorreia@redhat.com> - 18-102
|
||||
- Support a null pin
|
||||
Resolves: rhbz#2028091
|
||||
|
Loading…
Reference in New Issue
Block a user