From db0d42a62842ccd8103daae76e4a6ccf26cf1aac Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Thu, 31 Oct 2013 22:04:54 +0100 Subject: boostrap keys dir --- global/post-tasks.d/015cosmos-trust | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'global/post-tasks.d/015cosmos-trust') 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 -- cgit v1.1