2025-01-26 06:32:32 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
|
|
# 5 minute timeout for the package lock to arrive
|
|
|
|
|
apt-get -o DPkg::Lock::Timeout=600 autoremove -y
|
|
|
|
|
|
|
|
|
|
# Configure sshd to be faster
|
|
|
|
|
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
|
|
|
|
UseDNS no
|
|
|
|
|
PubkeyAcceptedKeyTypes +ssh-rsa
|
|
|
|
|
EOF
|
|
|
|
|
|
2025-08-18 12:35:13 -05:00
|
|
|
apt update
|
|
|
|
|
apt upgrade -y
|
|
|
|
|
|
2025-01-26 06:32:32 -06:00
|
|
|
# Clean up after ourselves
|
|
|
|
|
apt-get clean
|
|
|
|
|
|
|
|
|
|
virt="$(systemd-detect-virt)"
|
|
|
|
|
if [ "${virt}" == "microsoft" ]; then
|
|
|
|
|
apt-get install -y hyperv-daemons
|
|
|
|
|
systemctl enable hv-fcopy-daemon
|
|
|
|
|
systemctl enable hv-kvp-daemon
|
|
|
|
|
systemctl enable hv-vss-daemon
|
|
|
|
|
fi
|