2017-06-23 10:17:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Uninstall unnecessary packages
|
2017-06-23 10:35:14 +02:00
|
|
|
apt-get purge bsdmainutils dictionaries-common emacsen-common gnupg gnupg-agent iamerican ibritish ienglish-common installation-report ispell laptop-detect libsqlite3-0 libssl1.1 nano os-prober pinentry-curses task-english tasksel tasksel-data wamerican
|
2017-06-23 10:17:08 +02:00
|
|
|
|
|
|
|
# Install basic services and dependencies
|
|
|
|
apt-get --no-install-recommends install openssh-server plymouth
|
2017-06-23 10:21:59 +02:00
|
|
|
|
2017-06-23 11:01:08 +02:00
|
|
|
# Copy authorized_keys
|
|
|
|
cp basic/root/.ssh/authorized_keys /root/.ssh/authorized_keys
|
|
|
|
|
2017-06-23 10:24:16 +02:00
|
|
|
# Rename encrypted partition
|
|
|
|
sed -i 's/sda2_crypt/system/' /etc/crypttab
|
|
|
|
dmsetup rename sda2_crypt system
|
|
|
|
update-initramfs -u
|
|
|
|
|
2017-06-23 10:21:59 +02:00
|
|
|
# Set grub options
|
|
|
|
cp basic/etc/default/grub /etc/default/grub
|
2017-06-23 10:32:56 +02:00
|
|
|
update-grub
|
|
|
|
|
2017-06-23 10:35:14 +02:00
|
|
|
# Set legal banner with URL + latin2 character set
|
2017-06-23 10:32:56 +02:00
|
|
|
cp basic/etc/default/console-setup /etc/default/console-setup
|
2017-06-23 10:37:25 +02:00
|
|
|
cp basic/etc/issue /etc/issue
|
|
|
|
|
|
|
|
# Forbid login on tty1, disable tty2-6
|
|
|
|
cp basic/lib/systemd/system/getty@.service /lib/systemd/system/getty@.service
|
|
|
|
systemctl mask getty-static
|