blob: ebb2c952506168d6f10647280adce079e7571136 [file] [log] [blame]
Filip Pytlounac2be792016-01-08 12:09:49 +01001## Base packages and setup
Filip Pytloun2516a612016-02-12 10:50:29 +01002export DEBIAN_FRONTEND=noninteractive
Filip Pytlouncb52dd52016-02-01 10:42:54 +01003echo "exit 101" > /usr/sbin/policy-rc.d
4chmod +x /usr/sbin/policy-rc.d
Filip Pytloun2516a612016-02-12 10:50:29 +01005apt-get clean
Filip Pytlounac2be792016-01-08 12:09:49 +01006apt-get update
7
8# Cleanup old kernels, ensure latest is installed via virtual package
9if [ ! -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
14fi
15
16apt-get -y upgrade
17apt-get -y dist-upgrade
18
19apt-get autoremove --purge
20
21# Useful tools
Filip Pytloun7588e372016-02-10 17:38:47 +010022apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop tree
Filip Pytlounac2be792016-01-08 12:09:49 +010023
24# Tmux fixes
25cat << 'EOF' >> /etc/tmux.conf
26set -g default-terminal "screen-256color"
27set -g set-titles on
28set -g xterm-keys on
29EOF
30
31# Setup cloud-init
32apt-get -y install cloud-init