Merge pull request #17 from eest/patlu-handle-multiple-versions-of-cosmos-deb

This commit is contained in:
Fredrik Thulin 2022-11-15 18:54:39 +01:00 committed by GitHub
commit b454cd52ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -56,7 +56,8 @@ if [ ! -d "$cmd_fqdn" ]; then
fi fi
if [ "$cmd_do_bootstrap" = "yes" ]; then if [ "$cmd_do_bootstrap" = "yes" ]; then
scp apt/cosmos_1.5-2~sunet20220414_all.deb apt/bootstrap-cosmos.sh root@"$cmd_hostname": cosmos_deb=$(find apt/ -maxdepth 1 -name 'cosmos_*.deb' | sort -V | tail -1)
scp "$cosmos_deb" apt/bootstrap-cosmos.sh root@"$cmd_hostname":
ssh root@"$cmd_hostname" ./bootstrap-cosmos.sh "$cmd_fqdn" "$rrepo" "$rtag" ssh root@"$cmd_hostname" ./bootstrap-cosmos.sh "$cmd_fqdn" "$rrepo" "$rtag"
ssh root@"$cmd_hostname" cosmos update ssh root@"$cmd_hostname" cosmos update
ssh root@"$cmd_hostname" cosmos apply ssh root@"$cmd_hostname" cosmos apply

View file

@ -35,7 +35,8 @@ for pkg in rsync git git-core wget gpg; do
# exist without stopping the script # exist without stopping the script
apt-get -y install $pkg || true apt-get -y install $pkg || true
done done
dpkg -i cosmos_1.5-1_all.deb cosmos_deb=$(find ./ -maxdepth 1 -name 'cosmos_*.deb' | sort -V | tail -1)
dpkg -i "$cosmos_deb"
if ! test -d /var/cache/cosmos/repo; then if ! test -d /var/cache/cosmos/repo; then
cosmos clone "$cmd_repo" cosmos clone "$cmd_repo"