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