diff --git a/addhost b/addhost index 88f0102..cc1a479 100755 --- a/addhost +++ b/addhost @@ -56,7 +56,8 @@ if [ ! -d "$cmd_fqdn" ]; then fi 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" cosmos update ssh root@"$cmd_hostname" cosmos apply diff --git a/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh b/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh index 1426904..c31cea7 100755 --- a/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh +++ b/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh @@ -35,7 +35,8 @@ for pkg in rsync git git-core wget gpg; do # exist without stopping the script apt-get -y install $pkg || true 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 cosmos clone "$cmd_repo"