Filip Pytloun | ac2be79 | 2016-01-08 12:09:49 +0100 | [diff] [blame] | 1 | ## Base packages and setup |
Filip Pytloun | 2516a61 | 2016-02-12 10:50:29 +0100 | [diff] [blame^] | 2 | export DEBIAN_FRONTEND=noninteractive |
Filip Pytloun | cb52dd5 | 2016-02-01 10:42:54 +0100 | [diff] [blame] | 3 | echo "exit 101" > /usr/sbin/policy-rc.d |
| 4 | chmod +x /usr/sbin/policy-rc.d |
Filip Pytloun | 2516a61 | 2016-02-12 10:50:29 +0100 | [diff] [blame^] | 5 | apt-get clean |
Filip Pytloun | ac2be79 | 2016-01-08 12:09:49 +0100 | [diff] [blame] | 6 | apt-get update |
| 7 | |
| 8 | # Cleanup old kernels, ensure latest is installed via virtual package |
| 9 | if [ ! -f /tmp/no_install_kernel ]; then |
| 10 | # Update grub cmdline |
| 11 | sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 12 | sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 13 | update-grub |
| 14 | fi |
| 15 | |
| 16 | apt-get -y upgrade |
| 17 | apt-get -y dist-upgrade |
| 18 | |
| 19 | apt-get autoremove --purge |
| 20 | |
| 21 | # Useful tools |
Filip Pytloun | 7588e37 | 2016-02-10 17:38:47 +0100 | [diff] [blame] | 22 | apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop tree |
Filip Pytloun | ac2be79 | 2016-01-08 12:09:49 +0100 | [diff] [blame] | 23 | |
| 24 | # Tmux fixes |
| 25 | cat << 'EOF' >> /etc/tmux.conf |
| 26 | set -g default-terminal "screen-256color" |
| 27 | set -g set-titles on |
| 28 | set -g xterm-keys on |
| 29 | EOF |
| 30 | |
| 31 | # Setup cloud-init |
| 32 | apt-get -y install cloud-init |