home · contact · privacy
Fix. master
authorChristian Heller <c.heller@plomlompom.de>
Fri, 4 Apr 2025 18:22:33 +0000 (20:22 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 4 Apr 2025 18:22:33 +0000 (20:22 +0200)
bookworm/preseed.cfg
testing/scripts/make_writable_installer.sh
testing/scripts/update_preseed.sh

index 8e3d89b0f7c756155a88847cd1240fce549bac84..7553d7ccb70de4d72724c8eed07a61630ff9e794 100644 (file)
@@ -4,9 +4,9 @@ d-i anna/choose_modules multiselect
 
 d-i netcfg/link_wait_timeout string 3
 d-i netcfg/choose_interface select auto
-#d-i netcfg/wireless_essid string kadatheron
+#d-i netcfg/wireless_essid string REPLACE_WITH_WIFI_ESSID
 #d-i netcfg/wireless_essid seen true
-d-i netcfg/wireless_show_essids select kadatheron
+d-i netcfg/wireless_show_essids select REPLACE_WITH_WIFI_ESSID
 #d-i netcfg/wireless_show_essids seen true
 #d-i netcfg/confirm_essid boolean true
 #d-i netcfg/confirm_essid seen true
@@ -32,6 +32,7 @@ d-i partman-auto-crypto/erase_disks boolean false
 
 d-i base-installer/kernel/image string linux-image-amd64
 d-i base-installer/initramfs-tools/driver-policy most
+d-i base-installer/install-recommends boolean false
 
 #d-i pkgsel/run_tasksel boolean false
 
index b5327e793bd9f7f692b3cd23b3cfb3f236e2fc18..39e1396502389030c7e9218817e0552ee2a4b7ee 100755 (executable)
@@ -7,7 +7,7 @@ cd $(dirname "$0")
 . lib/abort_if_command_unknown
 . lib/abort_if_not_user
 . lib/abort_if_offline
-. lib/constants_installer
+. lib/constants_installer  # FILENAME_PRESEED_CFG, PATH_PRESEED_CFG
 . lib/expect_n_args
 . lib/get_mountable_device_path
 
index ffd093865383ce8810388b4dd8c23779d4ea4116..6a195a68cbe1c44477ba54dd7a7c8cee32177dc6 100755 (executable)
@@ -2,18 +2,32 @@
 set -e
 cd $(dirname "$0")
 . lib/abort_if_command_unknown
-. lib/constants_installer
+. lib/constants_installer  # FILENAME_PRESEED_CFG, PATH_PRESEED_CFG
 . lib/expect_n_args
 . lib/get_mountable_device_path
 
-expect_n_args 1 1 'DEVICE (e.g. "sdb")' $@
+expect_n_args 1 4 'DEVICE (e.g. "sdb1") [ROOT_PASSWORD] [WIFI_ESSID] [WIFI_PASSWORD]' $@
+DEVICE_NAME="$1"
+ROOT_PASSWORD="$2"
+WIFI_ESSID="$3"
+WIFI_PASSWORD="$4"
 abort_if_command_unknown pmount
 
-DEVICE_NAME="$1"
 PATH_DEVICE="$(get_mountable_device_path ${DEVICE_NAME})"
 PATH_MOUNTED="/media/$1"
 echo "Mounting ${PATH_DEVICE} …"
 pmount "${DEVICE_NAME}"
 trap "echo 'Unmounting '${PATH_DEVICE}; pumount ${DEVICE_NAME}" EXIT INT TERM
 echo "Copying ${PATH_PRESEED_CFG} …"
-cp "${PATH_PRESEED_CFG}" "${PATH_MOUNTED}/"
+PATH_MOUNTED_PRESEED_CFG="${PATH_MOUNTED}/${FILENAME_PRESEED_CFG}"
+cp "${PATH_PRESEED_CFG}" "${PATH_MOUNTED_PRESEED_CFG}"
+replace_if_provided() {
+    _VAR_NAME="$1"
+    val_of_var_of_name() { eval printf '"%s"' '"${'"$1"'}"'; }
+    if [ ! -z "$(val_of_var_of_name ${_VAR_NAME})" ]; then
+        sed -i "s/REPLACE_WITH_${_VAR_NAME}/$(val_of_var_of_name ${_VAR_NAME})/g" "${PATH_MOUNTED_PRESEED_CFG}"
+    fi
+}
+replace_if_provided ROOT_PASSWORD
+replace_if_provided WIFI_ESSID
+replace_if_provided WIFI_PASSWORD