summaryrefslogtreecommitdiff
path: root/cmdline/apt-key
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-06-06 13:24:13 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-06-06 13:24:13 +0200
commit563fd891d80feedefd812aad83844e2189870e2c (patch)
tree38283c8a67cfc049ce01880175992c44641f554a /cmdline/apt-key
parentbe728d8de5618040f6ae77fa958dd8c42129aa20 (diff)
* cmdline/apt-key:
- do not hardcode /etc but use Dir::Etc instead
Diffstat (limited to 'cmdline/apt-key')
-rwxr-xr-xcmdline/apt-key3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key
index 97d6e0323..c184e3e75 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -11,7 +11,8 @@ GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-k
if [ "$(id -u)" -eq 0 ]; then
# we could use a tmpfile here too, but creation of this tends to be time-consuming
- GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg"
+ eval $(apt-config shell TRUSTDBDIR Dir::Etc/d)
+ GPG_CMD="$GPG_CMD --trustdb-name ${TRUSTDBDIR}/trustdb.gpg"
fi
GPG="$GPG_CMD"