diff options
Diffstat (limited to 'cmdline/apt-key')
-rwxr-xr-x | cmdline/apt-key | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key index f0b084448..7beedd38d 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -5,7 +5,12 @@ unset GREP_OPTIONS # We don't use a secret keyring, of course, but gpg panics and # implodes if there isn't one available -GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg" +GPG_CMD='gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg' + +if ! id -u > /dev/null; then + GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg" +fi + GPG="$GPG_CMD" |