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 :: \
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
}
. 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
# 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
}
setup_user() {
echo "\nSetting up user: ${USERNAME}"
- adduser --disabled-password --gecos "" "${USERNAME}"
+ adduser --stdoutmsglevel=warn --disabled-password --gecos "" "${USERNAME}"
usermod -a -G sudo "${USERNAME}"
}
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
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}"