From: Christian Heller Date: Mon, 31 Aug 2015 03:47:03 +0000 (+0200) Subject: Grow server post-install script. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bdb.prefix%7D%7D/%7B%7Btodo.date%7D%7D?a=commitdiff_plain;h=a5ef7f7d00e45073870dbffea8bc98ea8449379c;p=config Grow server post-install script. --- diff --git a/jessie_start_server.sh b/jessie_start_server.sh index 67c7e6d..c9ce28f 100755 --- a/jessie_start_server.sh +++ b/jessie_start_server.sh @@ -22,9 +22,37 @@ 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 +# Call dhclient on startup. +cat > /etc/systemd/system/dhclient.service << EOF +[Unit] +Description=Ethernet connection + +[Service] +ExecStart=/sbin/dhclient eth0 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable /etc/systemd/system/dhclient.service + +# 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 + # Set up manuals. apt-get -y install man-db manpages less +# 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 + +# Set up timezone. +echo 'Europe/Berlin' > /etc/timezone +cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime + # Locale config. apt-get -y install locales echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen