home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 19 Apr 2025 13:52:11 +0000 (15:52 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 19 Apr 2025 13:52:11 +0000 (15:52 +0200)
bookworm/preseed.cfg
bookworm/scripts/lib/ensure_packages_of_tags
bookworm/scripts/lib/init_packages
bookworm/scripts/lib/setup_user
bookworm/scripts/setup_server.sh

index 6b1938dafb87ba9f43e8a599b89340f3fb0959c4..3d1b98a8621c99a4a22043dc1b631b2bdc970406 100644 (file)
@@ -38,6 +38,7 @@ user-setup-udeb       passwd/make-user boolean false
 d-i partman-auto/init_automatically_partition select 70some_device_crypto__________crypto
 # "Partition disks":"Select disk to partition:"/"/dev/nvme0n1 - 512.1 GB SAMSUNG MZVLB512HBJQ-000L7"
 #d-i partman-auto/disk string /dev/nvme0n1p3
+#d-i partman-auto/disk string /dev/nvme0n1
 #d-i partman-auto/select_disk select /var/lib/partman/devices/=dev=nvme0n1 
 # "Partition disks":"Partitioning scheme:"/"All files in one partition (recommended for new users)"
 d-i partman-auto/expert_recipe string custom-crypto :: \
index e8f5a9d4209e54174e89b7c08fc0480c10689a5f..87f59fe9839b0530e9e6232117d2f7660588c77f 100644 (file)
@@ -6,13 +6,13 @@ ensure_packages_of_tags() {
         if [ ! -f "${_PATH_APTMARK_TAG}" ]; then
             continue
         fi
-        echo -n "For tag '${_TAG}', make sure this is installed: "
+        echo -n "For tag '${_TAG}', ensuring this is installed: "
         cat "${_PATH_APTMARK_TAG}" | while read _LINE; do
             if [ ! $(echo "${_LINE}" | cut -c1) = "#" ]; then
                 echo -n "${_LINE} " 
                 apt-get -y -o Dpkg::Options::="--force-confnew" install "${_LINE}" > /dev/null
             fi
         done
-        echo '\n'
+        echo ''
     done
 }
index e00c5a49ccd4a72906b9bdcc52a5fb89900d0e9b..a2483f4f8a3c3dbd8c91a81e1981b09b8595225c 100644 (file)
@@ -1,7 +1,7 @@
 . lib/ensure_packages_of_tags
 
 init_packages() {
-    echo "\nInstalling and/or keeping only what's required by us or Debian."
+    echo "Installing and/or keeping only what's required by us or Debian."
     export DEBIAN_FRONTEND=noninteractive
 
     # mark non-requireds auto
@@ -22,7 +22,7 @@ init_packages() {
     # before purging, ensure tagged packages installed
     ensure_packages_of_tags $@ 
     echo "Autoremove and purge …"
-    apt-get -y --purge autoremove > /dev/null
+    apt-get -q -q -y --purge autoremove
     echo "And now: dist-upgrade …"
     apt-get -y dist-upgrade > /dev/null
 }
index 0395c46630c69d7b54fbb1991fd13cc537b20c3b..adadc2bd7f91b9c3d04630e8b1201ee6db617bd4 100644 (file)
@@ -2,6 +2,6 @@
 
 setup_user() {
     echo "\nSetting up user: ${USERNAME}"
-    adduser --disabled-password --gecos "" "${USERNAME}"
+    adduser --stdoutmsglevel=warn --disabled-password --gecos "" "${USERNAME}"
     usermod -a -G sudo "${USERNAME}"
 }
index 4ae0bf38fa1084d03c4df3c7e114b09e0217ac06..46a4eafd5f44774730e36d6e6468994b9859cd82 100755 (executable)
@@ -24,13 +24,12 @@ PATH_CADDY_REPO='https://dl.cloudsmith.io/public/caddy/stable'
 
 echo -n 'Determining IP …'
 EXTERNAL_IP=$(hostname -I | cut -d' ' -f1)
-echo " it's: ${EXTERNAP_IP}"
+echo " it's: ${EXTERNAL_IP}"
 
 if [ ! -z "FQDN" ]; then
     echo "Ensuring provided FQDN ${FQDN} maps to it …"
     IP_BY_DNS=$(getent ahostsv4 "${FQDN}" | head -1 | cut -d' ' -f1)
     if [ ! "${IP_BY_DNS}" = "${EXTERNAL_IP}" ]; then
-        echo ""
         abort "DNS mapping provided FQDN '${FQDN}' to ${IP_BY_DNS} rather than this system's external IP ${EXTERNAL_IP}."
     fi
 fi
@@ -68,15 +67,15 @@ if [ ! -z "${FQDN}" ]; then
 fi
 
 echo 'Syncing clock …'
-ntpdate-debian
+ntpdate-debian -s
 
 echo 'Moving SSH data from root to user …'
 mkdir -p "${PATH_USER_SSH}"
 mv "/root/${PATH_REL_SSH}/authorized_keys" "${PATH_USER_SSH}/"
 chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_SSH}"
 
-echo '\nSetting up minimal borg user …'
-adduser --system --home "${PATH_BORG_HOME}" --shell /bin/sh borg
+echo 'Setting up minimal borg user …'
+adduser --stdoutmsglevel=warn --system --home "${PATH_BORG_HOME}" --shell /bin/sh borg
 cp -a "${PATH_USER_SSH}" "${PATH_BORG_HOME}/"
 chown -R borg:nogroup "${PATH_BORG_HOME}/${PATH_REL_SSH}"