home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 6 May 2025 06:35:18 +0000 (08:35 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 6 May 2025 06:35:18 +0000 (08:35 +0200)
bookworm/scripts/minimize_installation.sh
bookworm/scripts/setup_server.sh
testing/scripts/_setup_secrets_user.sh
testing/scripts/setup_desktop.sh
testing/scripts/setup_secrets.sh

index e7a8cc92e029c9d0007f614fe8640a440a2568cc..9c6a40b889d4a21c0324acdacb7ddbdec65d6a05 100755 (executable)
@@ -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: "
index 24caecb3aaade4784bb3c4bec6c420b46cfb7159..eb3f8a55f17fb74e51c722fadf7fd3191f5709db 100755 (executable)
@@ -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
index e59bf25a0f1114c69c71f1ab59e431767f8abb4a..4662298be6e711a5f944baf79db8cc5a6a603102 100644 (file)
@@ -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
index 01c649c2b24568a544c1eda6223e0c128ab47250..8b88503610c373177dc9af0f3449f97cea9a4a2e 100755 (executable)
@@ -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
index fe398befc28d88b868865b22cdf2a965f58adee9..f50ed96bf21d45e6f9a78f2afd314baadb9e055c 100755 (executable)
@@ -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