summaryrefslogtreecommitdiff
path: root/global/post-tasks.d
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2013-10-31 22:04:54 +0100
committerLeif Johansson <leifj@sunet.se>2013-10-31 22:04:54 +0100
commitdb0d42a62842ccd8103daae76e4a6ccf26cf1aac (patch)
treecb4e09e90fa27fabec6e455654f4fc7f36201c74 /global/post-tasks.d
parente075010ec11e2377784ee9f9e9f7d3625e34bc35 (diff)
boostrap keys dir
Diffstat (limited to 'global/post-tasks.d')
-rwxr-xr-xglobal/post-tasks.d/015cosmos-trust6
1 files changed, 5 insertions, 1 deletions
diff --git a/global/post-tasks.d/015cosmos-trust b/global/post-tasks.d/015cosmos-trust
index ad2c066..f7d103c 100755
--- a/global/post-tasks.d/015cosmos-trust
+++ b/global/post-tasks.d/015cosmos-trust
@@ -1,6 +1,10 @@
#!/bin/sh
-for k in /etc/cosmos/keys/*.pub; do
+if -z "$COSMOS_KEYS"; then
+ COSMOS_KEYS=/etc/cosmos/keys
+fi
+
+for k in $COSMOS_KEYS/*.pub; do
fp=`cosmos gpg --with-colons --with-fingerprint < $k| awk -F: '$1 == "pub" {print $5}'`
cosmos gpg --with-colons --fingerprint | grep -q ":$fp:" || cosmos gpg --import < $k
done