From 7515782eb503152dfc3e84fee1260fb10d560df9 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Mon, 2 Sep 2013 16:01:50 +0200 Subject: import --- apt/bootstrap-cosmos.sh | 35 +++++++++++++++++++++++++++++++++++ apt/cosmos_1.2-2_all.deb | Bin 0 -> 11724 bytes 2 files changed, 35 insertions(+) create mode 100755 apt/bootstrap-cosmos.sh create mode 100644 apt/cosmos_1.2-2_all.deb (limited to 'apt') diff --git a/apt/bootstrap-cosmos.sh b/apt/bootstrap-cosmos.sh new file mode 100755 index 0000000..1e8b751 --- /dev/null +++ b/apt/bootstrap-cosmos.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +cmd_hostname="$1" +if test -z "$cmd_hostname"; then + echo "Usage: $0 HOSTNAME REPO" + exit 1 +fi + +cmd_repo="$2" +if test -z "$cmd_repo"; then + echo "Usage $0 HOSTNAME REPO" + exit 2 +fi + +set -x + +apt-get -y install rsync git-core +dpkg -i cosmos_1.2-2_all.deb + +if ! test -d /var/cache/cosmos/repo; then + cosmos clone "$cmd_repo" +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 + +COSMOS_BASE=/var/cache/cosmos /var/cache/cosmos/repo/global/pre-tasks.d/010cosmos-trust + +(date; nohup cosmos -v update && nohup cosmos -v apply; date) > /var/log/cosmos.log 2>&1 + +exit 0 diff --git a/apt/cosmos_1.2-2_all.deb b/apt/cosmos_1.2-2_all.deb new file mode 100644 index 0000000..9fe4434 Binary files /dev/null and b/apt/cosmos_1.2-2_all.deb differ -- cgit v1.1