From: Christian Heller Date: Sun, 3 May 2015 01:48:48 +0000 (+0200) Subject: Add Jessie post-installation script. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance2?a=commitdiff_plain;h=030be9f555f0eeafc37a9956618ee1979e4d120c;p=config Add Jessie post-installation script. --- diff --git a/jessie_start.sh b/jessie_start.sh new file mode 100755 index 0000000..664ef43 --- /dev/null +++ b/jessie_start.sh @@ -0,0 +1,40 @@ +#!/bin/sh +set -x + +# Post-installation reduction. (Answer "no" to GRUB question.) +dpkg-query -Wf '${Package} ${Priority}\n' | grep ' required' | sed 's/ required//' > list_white_unsorted +echo 'ifupdown' >> list_white_unsorted +echo 'isc-dhcp-client' >> list_white_unsorted +sort list_white_unsorted > list_white +dpkg-query -Wf '${Package}\n' > list_all_packages +sort list_all_packages > foo +mv foo list_all_packages +comm -3 list_all_packages list_white > list_black +apt-mark auto `cat list_black` +echo 'APT::AutoRemove::RecommendsImportant "false";' > /etc/apt/apt.conf.d/99mindeps +echo 'APT::AutoRemove::SuggestsImportant "false";' >> /etc/apt/apt.conf.d/99mindeps +apt-get -y --purge autoremove +rm list_all_packages list_white_unsorted list_white list_black +echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/99mindeps +echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf.d/99mindeps + +# Package management config, system upgrade. +echo 'deb http://ftp.debian.org/debian/ jessie main contrib non-free' > /etc/apt/sources.list +echo 'deb http://security.debian.org/ jessie/updates main contrib non-free' >> /etc/apt/sources.list +echo 'deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free' >> /etc/apt/sources.list +dhclient eth0 +apt-get update +apt-get -y dist-upgrade + +# Don't clear boot messages on start up. +sed -i 's/^TTYVTDisallocate=yes$/TTYVTDisallocate=no/g' /etc/systemd/system/getty.target.wants/getty\@tty1.service + +# Console config. (locales: 146, 1; console-setup: 27, 11, 1, 4) +apt-get -y install locales console-setup +dpkg-reconfigure locales +dpkg-reconfigure console-setup +echo 'export LC_ALL="en_US.UTF-8"' >> /etc/profile +apt-get -y install xserver-xorg xinit i3 + +# Add user. +#useradd -m -s /bin/bash plom