summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-23 11:20:51 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-23 11:20:51 +0200
commit9120d409efc74891d008a7cfc5180c1ac8645c8c (patch)
treeb160562c3ed9eec95e2874bd86ca4b413016edeb /cmdline
parent8de79b68a834a6cc7abb8976e96ed19374fc02a2 (diff)
* cmdline/apt-key:
- if command is 'add' do not error out if the specified keyring doesn't exist, it will be created by gpg
Diffstat (limited to 'cmdline')
-rwxr-xr-xcmdline/apt-key2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key
index e632be706..97d6e0323 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -152,7 +152,7 @@ if [ "$1" = "--keyring" ]; then
#echo "keyfile given"
shift
TRUSTEDFILE="$1"
- if [ -r "$TRUSTEDFILE" ]; then
+ if [ -r "$TRUSTEDFILE" ] || [ "$2" = 'add' ]; then
GPG="$GPG --keyring $TRUSTEDFILE --primary-keyring $TRUSTEDFILE"
else
echo >&2 "Error: The specified keyring »$TRUSTEDFILE« is missing or not readable"