V8.13.294.2025.10.28
Some checks failed
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 1m6s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m18s
💙 Generating a PUBLIC Live ISO. / 💙 Generating a PUBLIC Live ISO. (push) Has been cancelled
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Has been cancelled
Some checks failed
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 1m6s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m18s
💙 Generating a PUBLIC Live ISO. / 💙 Generating a PUBLIC Live ISO. (push) Has been cancelled
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Has been cancelled
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -15,7 +15,7 @@ set -Ceuo pipefail
|
||||
umask 0077
|
||||
|
||||
declare -grx VAR_SEMAPHORE="/root/cdi.ciss" # Semaphore to appear.
|
||||
declare -girx VAR_TIMEOUT=60 # Semaphore timer in seconds.
|
||||
declare -girx VAR_TIMEOUT=3600 # Semaphore timer in seconds.
|
||||
|
||||
install -d -m 0755 /run/lock
|
||||
exec 9> /run/lock/9999-cdi-starter.lock
|
||||
@@ -116,37 +116,37 @@ main() {
|
||||
declare -r var_repo_url="https://git.coresecret.dev/msw/CISS.debian.installer.git"
|
||||
declare -r var_repo_dir="/root/git/CISS.debian.installer"
|
||||
declare -i i=""
|
||||
declare var_mode=""
|
||||
declare var_log="" var_mode=""
|
||||
|
||||
var_log="/root/.ciss/cdi/log/9999-cdi-starter_$(date +"%Y-%m-%d_%H-%M-%S").log"
|
||||
|
||||
### Prepare logging.
|
||||
install -d -m 0700 /root/.ciss/cdi/log
|
||||
# shellcheck disable=SC2312
|
||||
exec > >(tee -a "${var_log}") 2>&1
|
||||
|
||||
printf "CISS.debian.installer Master V8.13.294.2025.10.28 is up! \n" >> "${var_log}"
|
||||
|
||||
### Sleep a moment to settle boot artifacts.
|
||||
sleep 8
|
||||
|
||||
### Harden Kernel parameters.
|
||||
sysp
|
||||
|
||||
### Prepare logging.
|
||||
install -d -m 0700 /root/.ciss/cdi/log
|
||||
# shellcheck disable=SC2155
|
||||
declare -r log="/root/.ciss/cdi/log/9999-cdi-starter_$(date +'%F_%H-%M-%S').log"
|
||||
# shellcheck disable=SC2312
|
||||
exec > >(tee -a "${log}") 2>&1
|
||||
|
||||
printf "CISS.debian.installer Master V8.13.292.2025.10.27 is up! \n" >| /root/.ciss/cdi/log/auto_start_begin_"$(date +"%Y-%m-%d_%H-%M-%S")".log
|
||||
printf "Command: [sysp] executed.\n" >> "${var_log}"
|
||||
|
||||
### Wait for network connectivity.
|
||||
net_wait
|
||||
printf "Command: [net_wait] executed.\n" >> "${var_log}"
|
||||
|
||||
### Download CISS.debian.installer.
|
||||
cd /root/git
|
||||
|
||||
[[ -d "${var_repo_dir}" ]] && rm -rf "${var_repo_dir}"
|
||||
|
||||
git clone "${var_repo_url}" "${var_repo_dir}"
|
||||
|
||||
chmod 0700 "${var_repo_dir}/ciss_debian_installer.sh"
|
||||
|
||||
cd "${var_repo_dir}"
|
||||
|
||||
printf "Command: [git clone %s %s] executed.\n" "${var_repo_url}" "${var_repo_dir}" >> "${var_log}"
|
||||
|
||||
### Poll up to VAR_TIMEOUT seconds for the semaphore to appear and be mode 0600.
|
||||
for ((i=0; i<VAR_TIMEOUT; i++)); do
|
||||
|
||||
@@ -157,6 +157,7 @@ main() {
|
||||
if [[ "${var_mode}" == "600" ]]; then
|
||||
|
||||
logger -t cdi-watcher "Semaphore found (${VAR_SEMAPHORE}, mode 0600) after ${i}s -> invoking cdi()"
|
||||
printf "Command: [cdi] to be executed.\n" >> "${var_log}"
|
||||
|
||||
cdi
|
||||
### cdi() never returns (it exits the script), so no code below this point in the 'then'-block will run.
|
||||
@@ -164,6 +165,7 @@ main() {
|
||||
else
|
||||
|
||||
logger -t cdi-watcher "Semaphore ${VAR_SEMAPHORE} present but wrong mode ${var_mode} (expected 600); ignoring"
|
||||
printf "INFO: [Semaphore %s present but wrong mode %s (expected 600); ignoring] executed.\n" "${VAR_SEMAPHORE}}" "${var_mode}}" >> "${var_log}"
|
||||
|
||||
fi
|
||||
|
||||
@@ -175,7 +177,7 @@ main() {
|
||||
|
||||
### Timeout reached without acceptable semaphore.
|
||||
logger -t cdi-watcher "No valid semaphore ${VAR_SEMAPHORE} (mode 0600) within ${VAR_TIMEOUT}s; exiting idle."
|
||||
printf "CISS.debian.installer Master V8.13.292.2025.10.27: No valid semaphore [%s] within [%s]s.\n" "${VAR_SEMAPHORE}" "${VAR_TIMEOUT}" >| /root/.ciss/cdi/log/auto_start_finished_"$(date +"%Y-%m-%d_%H-%M-%S")".log
|
||||
printf "CISS.debian.installer Master V8.13.294.2025.10.28: No valid semaphore [%s] within [%s]s.\n" "${VAR_SEMAPHORE}" "${VAR_TIMEOUT}" >> "${var_log}"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user