You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

28 lines
885 B

#!/bin/sh
# This script is run by debian installer using preseed/late_command
# directive, see preseed.cfg
# Setup console, remove timeout on boot.
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"/g; s/TIMEOUT=5/TIMEOUT=0/g' /etc/default/grub
update-grub
# Members of `sudo` group are not asked for password.
sed -i 's/%sudo\tALL=(ALL:ALL) ALL/%sudo\tALL=(ALL:ALL) NOPASSWD:ALL/g' /etc/sudoers
# Empty message of the day.
echo -n > /etc/motd
# Install collectd and config.
#apt-get install -y collectd-core
#cp /tmp/postinst/collectd.conf /etc/collectd/
export DEBIAN_FRONTEND=noninteractive
apt install -y vim
# Set domain name in hosts file
sed -i 's/127.0.1.1\t\([a-z]*\).*/127.0.1.1\tvm\t\1/' /etc/hosts
# Avoid using DHCP-server provided domain name.
#sed -i 's/#supersede.*/supersede domain-name "dp-net.com";/' /etc/dhcp/dhclient.conf