home · contact · privacy
Fix broken setup script.
[config] / bookworm / setup_scripts / setup.sh
1 #!/bin/sh
2 set -e
3 . ./misc.sh
4
5 expect_n_args 2 "(hostname, FQDN)" "$@"
6 hostname="$1"
7 fqdn="$2"
8 shift 2
9
10 cd "${setup_scripts_dir}"
11
12 # Adapt /etc/ to our needs by copying from ./etc_files. This will set
13 # basic configurations affecting following steps, such as setup of APT
14 # and the locale selection, so needs to be right at the beginning.
15 ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" all "$@"
16
17 # Set hostname and FQDN.
18 ./set_hostname_and_fqdn.sh "${hostname}" "${fqdn}"
19
20 # Ensure package installation state as defined by what packages are
21 # defined as required by Debian policy and by settings in ./apt-mark/.
22 apt update
23 ./install_for_target.sh all "$@"
24 ./purge_nonrequireds.sh all "$@"
25
26 # Ensure our desired locale is available.
27 locale-gen
28
29 # Only upgrade after reducing the system to the desired minimum, so that
30 # we don't need to get more data than necessary.
31 apt -y dist-upgrade
32
33 # Set Berlin localtime.
34 ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime