diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2021-07-25 19:55:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2021-07-26 03:46:53 +0000 |
commit | 4706c835140a29b6f1094ed96689e79aa0f5b702 (patch) | |
tree | e307b35e4b6ace1a65f91b2eddfed55a5be04073 /libexec/container | |
parent | Speeding up container list command by optimizing IP address gathering. (diff) | |
download | compute-tools-4706c835140a29b6f1094ed96689e79aa0f5b702.tar.xz compute-tools-4706c835140a29b6f1094ed96689e79aa0f5b702.zip |
Support fetching remote keys from keyserver in container key command.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | libexec/container/key | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libexec/container/key b/libexec/container/key index 4cc62dc..6c9c8c1 100755 --- a/libexec/container/key +++ b/libexec/container/key @@ -76,7 +76,7 @@ Parameters () Usage () { - echo "Usage: ${PROGRAM} ${COMMAND} [-a|--add KEY] [-l|--list] [-r|--remove KEY]" >&2 + echo "Usage: ${PROGRAM} ${COMMAND} [-a|--add KEY_FILE|KEY_ID] [-l|--list] [-r|--remove KEY|KEY_ID]" >&2 exit 1 } @@ -140,7 +140,12 @@ fi case "${ACTION}" in add) - gpg --homedir "${KEYS}" --import "${ADD}" + if [ -e "${ADD}" ] + then + gpg --homedir "${KEYS}" --import "${ADD}" + else + gpg --homedir "${KEYS}" --recv "${ADD}" + fi ;; list) |