From 6c25564aecd033f84fcf352cd57b09370525671e Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 31 Mar 2025 12:50:19 +0200 Subject: [PATCH] Fixes. --- bookworm/preseed.cfg | 21 +++++++++---------- .../scripts/lib/constants_user | 0 bookworm/scripts/lib/setup_users | 5 ++--- bookworm/scripts/setup_server.sh | 5 ++--- testing/scripts/_setup_secrets_user.sh | 2 +- testing/scripts/lib/constants_user | 1 + testing/scripts/setup_desktop.sh | 4 ++-- 7 files changed, 18 insertions(+), 20 deletions(-) rename testing/scripts/lib/constants => bookworm/scripts/lib/constants_user (100%) create mode 120000 testing/scripts/lib/constants_user diff --git a/bookworm/preseed.cfg b/bookworm/preseed.cfg index 82d6d68..c9b5358 100644 --- a/bookworm/preseed.cfg +++ b/bookworm/preseed.cfg @@ -1,12 +1,12 @@ #_preseed_V1 -#d-i debian-installer/load-cdrom/title +#d-i anna/choose-modules multiselect , -d-i netcfg/choose_interface select auto d-i netcfg/link_wait_timeout string 3 -#d-i netcfg/wireless_security_type wpa -d-i netcfg/use_autoconfig true -#d-i netcfg/wireless_essid kadatheron +d-i netcfg/choose_interface select auto +#d-i netcfg/wireless_essid string kadatheron +d-i netcfg/wireless_security_type select wpa +d-i netcfg/use_autoconfig boolean true d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain @@ -14,10 +14,9 @@ d-i passwd/root-login boolean true user-setup-udeb passwd/make-user boolean false #d-i partman-auto/method string crypto -#d-i partman-auto/select_disk /var/lib/partman/devices/=dev=nvme0n1 +#d-i partman-auto/select_disk string /var/lib/partman/devices/=dev=nvme0n1 d-i partman-auto-lvm/guided_size string max -#d-i partman-auto-lvm/new_vg_name plomvg -#d-i partman-lvm/confirm true +#d-i partman-auto-lvm/new_vg_name string plomvg #d-i partman-auto/choose_recipe select atomic d-i partman-auto-crypto/erase_disks boolean false # d-i partman-lvm/confirm boolean true @@ -27,15 +26,15 @@ d-i base-installer/initramfs-tools/driver-policy most #d-i pkgsel/run_tasksel boolean false -#d-i apt-setup/use-mirror true +#d-i apt-setup/use-mirror boolean true d-i mirror/protocol string http -#d-i mirror/http/proxy +d-i mirror/http/proxy string "" #d-i mirror/http/hostname string http.us.debian.org d-i apt-setup/enable-source-repositories true d-i apt-setup/non-free-firmware boolean true d-i apt-setup/non-free boolean true d-i apt-setup/contrib boolean true -d-i apt-setup/services-select security, updates +d-i apt-setup/services-select multiselect security, updates d-i grub-installer/force-efi-extra-removable false d-i grub-installer/update-nvram true diff --git a/testing/scripts/lib/constants b/bookworm/scripts/lib/constants_user similarity index 100% rename from testing/scripts/lib/constants rename to bookworm/scripts/lib/constants_user diff --git a/bookworm/scripts/lib/setup_users b/bookworm/scripts/lib/setup_users index 96c5d58..01b15ea 100644 --- a/bookworm/scripts/lib/setup_users +++ b/bookworm/scripts/lib/setup_users @@ -1,11 +1,10 @@ . lib/copy_dirtree +. lib/constants_user setup_users() { - USERNAME="$1" - MIN_TAGS="$2" + MIN_TAGS="$1" TAGS_USER="$2" PATH_CONF_HOME=../home - PATH_USER_HOME=/home/"${USERNAME}" echo "\nSetting up root user's home directory." copy_dirtree "${PATH_CONF_HOME}" '/root' ${MIN_TAGS} root diff --git a/bookworm/scripts/setup_server.sh b/bookworm/scripts/setup_server.sh index b04de66..79086ef 100755 --- a/bookworm/scripts/setup_server.sh +++ b/bookworm/scripts/setup_server.sh @@ -3,6 +3,7 @@ set -e cd $(dirname "$0") . lib/constants_repopaths # PATH_CONF . lib/constants_server # PATH_REL_SSH, PATH_SSH +. lib/constants_user # USERNAME . lib/copy_dirtree . lib/determine_ip . lib/expect_min_n_args @@ -15,8 +16,6 @@ expect_min_n_args 2 '(hostname, FQDN)' "$@" HOSTNAME="$1" FQDN="$2" -USERNAME=plom -PATH_USER_HOME="/home/${USERNAME}" PATH_REL_ETC=etc PATH_CONF_ETC="${PATH_CONF}/${PATH_REL_ETC}" PATH_USER_SSH="${PATH_USER_HOME}/${PATH_REL_SSH}" @@ -38,7 +37,7 @@ echo '\nSetting Berlin localtime.' ln -sf /usr/share/zoneinfo/Europe/Berlin "${PATH_ETC}/localtime" ntpdate-debian -setup_users plom "${MIN_TAGS}" +setup_users "${MIN_TAGS}" "" mkdir -p "${PATH_USER_SSH}" mv "${PATH_SSH}/authorized_keys" "${PATH_USER_SSH}/" diff --git a/testing/scripts/_setup_secrets_user.sh b/testing/scripts/_setup_secrets_user.sh index 30e08aa..f190d5d 100644 --- a/testing/scripts/_setup_secrets_user.sh +++ b/testing/scripts/_setup_secrets_user.sh @@ -2,7 +2,7 @@ set -e cd $(dirname "$0") -. lib/constants # USERNAME +. lib/constants_user # USERNAME . lib/abort . lib/abort_if_exists . lib/abort_if_not_user diff --git a/testing/scripts/lib/constants_user b/testing/scripts/lib/constants_user new file mode 120000 index 0000000..1e15899 --- /dev/null +++ b/testing/scripts/lib/constants_user @@ -0,0 +1 @@ +../../../bookworm/scripts/lib/constants_user \ No newline at end of file diff --git a/testing/scripts/setup_desktop.sh b/testing/scripts/setup_desktop.sh index f1b39b2..c27758f 100755 --- a/testing/scripts/setup_desktop.sh +++ b/testing/scripts/setup_desktop.sh @@ -3,8 +3,8 @@ set -e cd $(dirname "$0") . lib/abort . lib/abort_if_offline -. lib/constants # PATH_USER_HOME, USERNAME . lib/constants_repopaths # PATH_CONF +. lib/constants_user # PATH_USER_HOME, USERNAME . lib/copy_dirtree . lib/determine_ip . lib/expect_min_n_args @@ -111,5 +111,5 @@ echo "\nSetting Berlin localtime." ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime ntpdate-debian -setup_users 'plom' "${MIN_TAGS}" "${TAGS_USER}" +setup_users "${MIN_TAGS}" "${TAGS_USER}" passwd "${USERNAME}" -- 2.30.2