V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 59s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-30 23:32:21 +02:00
parent 67dc83c31f
commit 88854df9d8
3 changed files with 27 additions and 11 deletions

View File

@@ -66,25 +66,37 @@ minimal_toolset() {
[jq]="jq"
)
declare var_bin=""
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
declare var_bin="" var_bin=""
### Installation most basic packages.
do_in_target "${TARGET}" apt-get install -y --no-install-recommends locales tzdata debconf
### Collecting missing binaries.
for var_bin in "${!hmp_tool_pkg[@]}"; do
if ! do_in_target_script "${TARGET}" "command -v ${var_bin} >/dev/null"; then
do_in_target "${TARGET}" apt-get install -y "${hmp_tool_pkg[${var_bin}]}"
ary_missing_pkgs+=("${hmp_tool_pkg[${var_bin}]}")
fi
done
do_log "debug" "file_only" "4090() [ary_missing_pkgs]='${ary_missing_pkgs[*]}'."
do_in_target "${TARGET}" apt-get install -y locales tzdata debconf
### Installing unique list of packages
if ((${#ary_missing_pkgs[@]})); then
# shellcheck disable=SC2312
mapfile -t ary_unique_pkgs < <(printf '%s\n' "${ary_missing_pkgs[@]}" | sort -u)
do_log "debug" "file_only" "4090() [ary_unique_pkgs]='${ary_unique_pkgs[*]}'."
do_in_target "${TARGET}" apt-get install -y --no-install-recommends "${ary_unique_pkgs[@]}"
fi
### Ensure systemd and machine-id are in place
if ! do_in_target_script "${TARGET}" "command -v systemctl >/dev/null"; then
do_log "info" "file_only" "4090() 'systemctl' not found — installing 'systemd' and dependencies."
do_in_target "${TARGET}" apt-get install -y systemd systemd-sysv dbus
do_in_target "${TARGET}" apt-get install -y --no-install-recommends systemd systemd-sysv dbus
else