Filip Pytloun | 60411d1 | 2015-06-25 21:14:41 +0200 | [diff] [blame] | 1 | ## Base packages and setup |
Filip Pytloun | 7588e37 | 2016-02-10 17:38:47 +0100 | [diff] [blame] | 2 | # Ensure our repository is the only one present |
| 3 | echo "deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ trusty main security extra tcp tcp-salt" > /etc/apt/sources.list |
Filip Pytloun | 60411d1 | 2015-06-25 21:14:41 +0200 | [diff] [blame] | 4 | |
Filip Pytloun | 2516a61 | 2016-02-12 10:50:29 +0100 | [diff] [blame^] | 5 | export DEBIAN_FRONTEND=noninteractive |
Filip Pytloun | cb52dd5 | 2016-02-01 10:42:54 +0100 | [diff] [blame] | 6 | echo "exit 101" > /usr/sbin/policy-rc.d |
| 7 | chmod +x /usr/sbin/policy-rc.d |
Filip Pytloun | 2516a61 | 2016-02-12 10:50:29 +0100 | [diff] [blame^] | 8 | apt-get clean |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 9 | apt-get update |
Filip Pytloun | e3181af | 2015-06-25 22:11:22 +0200 | [diff] [blame] | 10 | |
| 11 | # Cleanup old kernels, ensure latest is installed via virtual package |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 12 | apt-get purge -y linux-image-* linux-headers-* |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 13 | if [ ! -f /tmp/no_install_kernel ]; then |
jan kaufman | 5fc5163 | 2015-08-19 14:46:02 +0200 | [diff] [blame] | 14 | apt-get install -y linux-generic-lts-vivid |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 15 | |
| 16 | # Update grub cmdline |
| 17 | sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 18 | sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 19 | update-grub |
| 20 | fi |
Filip Pytloun | e3181af | 2015-06-25 22:11:22 +0200 | [diff] [blame] | 21 | |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 22 | apt-get -y upgrade |
| 23 | apt-get -y dist-upgrade |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 24 | |
Filip Pytloun | e3181af | 2015-06-25 22:11:22 +0200 | [diff] [blame] | 25 | apt-get autoremove --purge |
| 26 | |
Filip Pytloun | dd27ad8 | 2015-06-18 11:12:08 +0200 | [diff] [blame] | 27 | # Useful tools |
Filip Pytloun | 7588e37 | 2016-02-10 17:38:47 +0100 | [diff] [blame] | 28 | apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop tree |
Filip Pytloun | 3983236 | 2015-06-25 18:05:47 +0200 | [diff] [blame] | 29 | |
| 30 | # Tmux fixes |
| 31 | cat << 'EOF' >> /etc/tmux.conf |
| 32 | set -g default-terminal "screen-256color" |
| 33 | set -g set-titles on |
| 34 | set -g xterm-keys on |
| 35 | EOF |
Filip Pytloun | dd27ad8 | 2015-06-18 11:12:08 +0200 | [diff] [blame] | 36 | |
Filip Pytloun | dd27ad8 | 2015-06-18 11:12:08 +0200 | [diff] [blame] | 37 | # Setup cloud-init |
jan kaufman | 0fcf1a7 | 2015-05-06 10:16:12 +0200 | [diff] [blame] | 38 | apt-get -y install cloud-init |