summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2013-10-31 23:28:46 +0100
committerLeif Johansson <leifj@sunet.se>2013-10-31 23:28:46 +0100
commitdd2d34287b88b82f299f14baae116cb8244cb385 (patch)
tree02834d4103d2f65e78894ebe55f1c4353bf05c5b /apt
parent3a8ff2b979f678a818dd7b4965f633dd3ed6cda1 (diff)
parent54000987a08f43e33d6c41ef18f0510f6ce7c540 (diff)
Merge branch 'multiverse'sunet-ops-2013-10-31-v21
Diffstat (limited to 'apt')
-rwxr-xr-xapt/bootstrap-cosmos.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/apt/bootstrap-cosmos.sh b/apt/bootstrap-cosmos.sh
index 5b6bc50..1e7b941 100755
--- a/apt/bootstrap-cosmos.sh
+++ b/apt/bootstrap-cosmos.sh
@@ -4,16 +4,22 @@ set -e
cmd_hostname="$1"
if test -z "$cmd_hostname"; then
- echo "Usage: $0 HOSTNAME REPO"
+ echo "Usage: $0 HOSTNAME REPO TAGPATTERN"
exit 1
fi
cmd_repo="$2"
if test -z "$cmd_repo"; then
- echo "Usage $0 HOSTNAME REPO"
+ echo "Usage $0 HOSTNAME REPO TAGPATTERN"
exit 2
fi
+cmd_tags="$3"
+if test -z "$cmd_tags"; then
+ echo "Usage $0 HOSTNAME REPO TAGPATTERN"
+ exit 3
+fi
+
set -x
apt-get -y install rsync git-core
@@ -26,7 +32,7 @@ fi
hostname $cmd_hostname
perl -pi -e "s,#COSMOS_REPO_MODELS=.*,COSMOS_REPO_MODELS=\"\\\$COSMOS_REPO/global/:\\\$COSMOS_REPO/$cmd_hostname/\"," /etc/cosmos/cosmos.conf
-perl -pi -e 's,#COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=.*,COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN="eduid-cosmos*",' /etc/cosmos/cosmos.conf
+perl -pi -e 's,#COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=.*,COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN="${cmd_tags}*",' /etc/cosmos/cosmos.conf
env COSMOS_BASE=/var/cache/cosmos COSMOS_KEYS=/var/cache/cosmos/repo/global/overlay/etc/cosmos/keys /var/cache/cosmos/repo/global/post-tasks.d/015cosmos-trust