| ## Base packages and setup |
| export DEBIAN_FRONTEND=noninteractive |
| echo "exit 101" > /usr/sbin/policy-rc.d |
| chmod +x /usr/sbin/policy-rc.d |
| # Cleanup old kernels, ensure latest is installed via virtual package |
| if [ ! -f /tmp/no_install_kernel ]; then |
| sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| apt-get autoremove --purge |
| apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop tree |
| cat << 'EOF' >> /etc/tmux.conf |
| set -g default-terminal "screen-256color" |
| apt-get -y install cloud-init |