From: Christian Heller Date: Tue, 6 May 2025 06:35:18 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/unset_cookie?a=commitdiff_plain;h=58299de998e96235ea0d644f8eda4decd63ca4f2;p=config Fix. --- diff --git a/bookworm/scripts/minimize_installation.sh b/bookworm/scripts/minimize_installation.sh index e7a8cc9..9c6a40b 100755 --- a/bookworm/scripts/minimize_installation.sh +++ b/bookworm/scripts/minimize_installation.sh @@ -18,7 +18,7 @@ _PATH_LIST_BLACK="${_PATH_LIST_PREFIX}black" if ! which calc > /dev/null; then prefixed_msg 'not found calc, which is needed, so installing …' - apt-get -y -q -q install calc > /dev/null + apt_get_digested '-q -q install calc' fi prefixed_msg_no_nl "collect packages deemed '${_TOK_REQ}' by Debian: " diff --git a/bookworm/scripts/setup_server.sh b/bookworm/scripts/setup_server.sh index 24caecb..eb3f8a5 100755 --- a/bookworm/scripts/setup_server.sh +++ b/bookworm/scripts/setup_server.sh @@ -1,6 +1,7 @@ #!/bin/sh set -e cd $(dirname "$0") +. lib/apt_get_digested . lib/constants_etc # PATH_ETC . lib/constants_ssh # PATH_REL_SSH, PATH_USER_SSH . lib/copy_dirtrees_of_tags @@ -48,7 +49,7 @@ if [ ! -z "${FQDN}" ]; then fi prefixed_msg 'Ensure we have curl and gpg (for caddy installation preparation) …' -apt-get -y install curl gpg > /dev/null +apt_get_digested 'install curl gpg' PATH_CURL_ERROR="$(path_tmp_timestamped curl_error)" prefixed_msg 'Retrieve caddy repo key …' set +e diff --git a/testing/scripts/_setup_secrets_user.sh b/testing/scripts/_setup_secrets_user.sh index e59bf25..4662298 100644 --- a/testing/scripts/_setup_secrets_user.sh +++ b/testing/scripts/_setup_secrets_user.sh @@ -10,9 +10,11 @@ cd $(dirname "$0") . lib/constants_user # USERNAME . lib/constants_borg # NAME_BORGAPP . lib/mount_secrets # mount_secrets, copy_and_unmount_secrets +. lib/prefixed_msg . lib/retry_until . lib/trapp +prefixed_msg_init PATH_REPOS="${HOME}/repos" REPOS_SITE_DOMAIN=plomlompom.com REMOTE_PATH_REPOS=/var/repos @@ -27,7 +29,7 @@ mount_secrets "$1" # sets PASSPHRASE copy_and_unmount_secrets 'in' export BORG_PASSPHRASE="${PASSPHRASE}" -echo "\n# Setting up ~/.ssh …" +prefixed_msg 'Setting up ~/.ssh …' cp -a "${PATH_SECRETS_SSH}" "${PATH_USER_SSH}" eval $(ssh-agent) stty -echo @@ -36,7 +38,7 @@ retry_until 1 'echo ""' 'ssh-add -q' 'echo "Aborting due to ssh-add error"' stty echo trapp -echo "\n\n# Setting up ~/repos …" +prefixed_msg 'Setting up ~/repos …' REPOS_SITE_LOGIN="${USERNAME}@${REPOS_SITE_DOMAIN}" mkdir "${PATH_REPOS}" cd "${PATH_REPOS}" @@ -45,7 +47,7 @@ ssh ${REPOS_SITE_LOGIN} "cd ${REMOTE_PATH_REPOS} && ls -1" | while read REPO_NAM done cd - > /dev/null -echo "\n# Setting up borg and pull in ~/org …" +prefixed_msg '# Setting up borg and pull in ~/org …' cd "${PATH_SECRETS_BORGKEYS}" ls -1 | while read _FILENAME; do "${NAME_BORGAPP}" claim "${_FILENAME}" @@ -53,3 +55,5 @@ done cd - retry_until 2 '' "${NAME_BORGAPP} orgpull" "echo '# Aborting due to unexpected ${NAME_BORGAPP} error.'" '' 'direct' echo "${_OUTPUT}" + +prefixed_msg_exit diff --git a/testing/scripts/setup_desktop.sh b/testing/scripts/setup_desktop.sh index 01c649c..8b88503 100755 --- a/testing/scripts/setup_desktop.sh +++ b/testing/scripts/setup_desktop.sh @@ -3,6 +3,7 @@ set -e cd $(dirname "$0") . lib/abort . lib/abort_if_offline +. lib/apt_get_digested . lib/constants_etc # PATH_ETC . lib/constants_user # USERNAME . lib/copy_dirtrees_of_tags @@ -64,7 +65,7 @@ adopt_wifi_connection() { ./from_older_upgrade.sh desktop # NB: This needs to come before steps potentially overwriting /etc/network/interfaces. -apt-get -y install network-manager > /dev/null +apt_get_digested '-q -q install network-manager' if [ "$(nmcli -f TYPE conn | grep 'wifi' | wc -l)" = "0" ]; then prefixed_msg "Checking for existing wifi config in ${PATH_NETWORK_INTERFACES} …" adopt_wifi_connection diff --git a/testing/scripts/setup_secrets.sh b/testing/scripts/setup_secrets.sh index fe398be..f50ed96 100755 --- a/testing/scripts/setup_secrets.sh +++ b/testing/scripts/setup_secrets.sh @@ -6,6 +6,9 @@ cd $(dirname "$0") . lib/constants_repopaths # PATH_CONF, PATH_SCRIPTS . lib/constants_user # USERNAME . lib/path_tmp_timestamped +. lib/prefixed_msg + +prefixed_msg_init check_finished_marker 'setup_desktop' abort_if_not_user root @@ -13,8 +16,10 @@ PATH_REL_SETUP_SECRETS_USER="$(basename ${PATH_CONF})/$(basename ${PATH_SCRIPTS} PATH_REPO="$(dirname ${PATH_CONF})" PATH_TMP_REPO="$(path_tmp_timestamped configrepo)" -echo "# Setting up config repo copy for user at ${PATH_TMP_REPO} …" +prefixed_msg "Setting up config repo copy for user at ${PATH_TMP_REPO} …" cp -a "${PATH_REPO}" "${PATH_TMP_REPO}" chown -R "${USERNAME}:${USERNAME}" "${PATH_TMP_REPO}" su -l "${USERNAME}" -c "/bin/sh ${PATH_TMP_REPO}/${PATH_REL_SETUP_SECRETS_USER} $1" rm -rf "${PATH_TMP_REPO}" + +prefixed_msg_exit