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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-31 09:47:46 +02:00
parent e986b39732
commit bbf95af177
2 changed files with 6 additions and 4 deletions

View File

@@ -84,13 +84,15 @@ do_in_target() {
# Arguments:
# 1: Target of the chroot environment
# 2: Command string to execute inside a shell (quoted)
# 3: Log level of command pipeline to be executed.
# Returns:
# 0: on success
# ERR_CHRT_COMMAND: on failure
#######################################
do_in_target_script() {
declare var_chroot_target="$1"; shift
declare var_chroot_script="$1"
declare var_chroot_target="$1"
declare var_chroot_script="$2"
declare var_log_level_on_error="${3:-emergency}"
declare -r var_default_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
if [[ -z "${var_chroot_script}" ]]; then
@@ -112,7 +114,7 @@ do_in_target_script() {
then
do_log "emergency" "file_only" "1080() Command: [chroot ${var_chroot_target} /usr/bin/env -i HOME=/root PATH=${var_default_path} TERM=${TERM} LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none /bin/bash -c ${var_chroot_script}] failed."
do_log "${var_log_level_on_error}" "file_only" "1080() Command: [chroot ${var_chroot_target} /usr/bin/env -i HOME=/root PATH=${var_default_path} TERM=${TERM} LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none /bin/bash -c ${var_chroot_script}] failed."
return "${ERR_CHRT_COMMAND}"
# TODO: Test with Dialog Wrapper in interactive mode.

View File

@@ -77,7 +77,7 @@ minimal_toolset() {
### Collecting missing binaries.
for var_bin in "${!hmp_tool_pkg[@]}"; do
if ! do_in_target_script "${TARGET}" "command -v ${var_bin} >/dev/null"; then
if ! do_in_target_script "${TARGET}" "command -v ${var_bin} >/dev/null" "debug"; then
ary_missing_pkgs+=("${hmp_tool_pkg[${var_bin}]}")
fi