summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_apt_configure.py
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-30 13:07:22 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-30 13:07:22 +0200
commit3c85315373306729443ef79fd8e54af46a7bc849 (patch)
tree8eb476e34bc9832aba95d2648820de9bcbe56baa /cloudinit/config/cc_apt_configure.py
parent964ec3ae45c27cf55e0c1349138294ff11debab8 (diff)
downloadvyos-cloud-init-3c85315373306729443ef79fd8e54af46a7bc849.tar.gz
vyos-cloud-init-3c85315373306729443ef79fd8e54af46a7bc849.zip
fix EXPORT_GPG_KEYID for existing keys
This was broken for keys already existing in the local keyring. There instead of the keycontent it reported the header like: pub 1024R/03683F77 2009-10-27 uid Launchpad PPA for Scott Moser
Diffstat (limited to 'cloudinit/config/cc_apt_configure.py')
-rw-r--r--cloudinit/config/cc_apt_configure.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py
index 2dd48844..d603f417 100644
--- a/cloudinit/config/cc_apt_configure.py
+++ b/cloudinit/config/cc_apt_configure.py
@@ -40,7 +40,7 @@ EXPORT_GPG_KEYID = """
k=${1} ks=${2};
exec 2>/dev/null
[ -n "$k" ] || exit 1;
- armour=$(gpg --list-keys --armour "${k}")
+ armour=$(gpg --export --armour "${k}")
if [ -z "${armour}" ]; then
gpg --keyserver ${ks} --recv "${k}" >/dev/null &&
armour=$(gpg --export --armour "${k}") &&