diff options
author | Leif Johansson <leifj@sunet.se> | 2013-10-31 22:05:12 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2013-10-31 22:05:12 +0100 |
commit | 0b5391c01ad7f919122e2d3737c860aec1d5cca6 (patch) | |
tree | 65e255b4cf4c533220ce6c597915547bda098688 | |
parent | c97027f5b925d52ef3cb120bc22383f74f653f1a (diff) | |
parent | db0d42a62842ccd8103daae76e4a6ccf26cf1aac (diff) |
Merge branch 'multiverse'sunet-ops-2013-10-31-v05
-rwxr-xr-x | apt/bootstrap-cosmos.sh | 1 | ||||
-rwxr-xr-x | global/post-tasks.d/015cosmos-trust | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apt/bootstrap-cosmos.sh b/apt/bootstrap-cosmos.sh index 263c083..5dbb21a 100755 --- a/apt/bootstrap-cosmos.sh +++ b/apt/bootstrap-cosmos.sh @@ -29,6 +29,7 @@ perl -pi -e "s,#COSMOS_REPO_MODELS=.*,COSMOS_REPO_MODELS=\"\\\$COSMOS_REPO/globa perl -pi -e 's,#COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=.*,COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN="eduid-cosmos*",' /etc/cosmos/cosmos.conf COSMOS_BASE=/var/cache/cosmos /var/cache/cosmos/repo/global/post-tasks.d/015cosmos-trust +COSMOS_KEYS=/var/cache/cosmos/repo/global/overlay/etc/cosmos/keys (date; nohup cosmos -v update && nohup cosmos -v apply; date) > /var/log/cosmos.log 2>&1 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 |