Thomas Stallinger dd7147aee0 fix: make 20_storage.sh self-contained like every other module
It called log_info/log_warn/error_exit/list_install_disks without
sourcing anything - leftover from before modules were run as
standalone subprocesses via run_module() rather than sourced into
installer.sh. Never noticed because the pipeline never reached this
module in a live run until now. Behavior unchanged: still just lists
disks and warns that partitioning is disabled (Phase 1).
2026-07-20 14:51:28 +02:00

38 lines
759 B
Bash
Executable File

#!/usr/bin/env bash
set -Eeuo pipefail
SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"
readonly SCRIPT_NAME
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly SCRIPT_DIR
# shellcheck source=../lib/checks.sh
source "${SCRIPT_DIR}/../lib/checks.sh"
log() {
printf '[%s] %s\n' "${SCRIPT_NAME}" "$*"
}
fatal() {
printf '[%s] FEHLER: %s\n' "${SCRIPT_NAME}" "$*" >&2
exit 1
}
main() {
log "Datenträger werden erkannt..."
local disks
disks="$(list_install_disks || true)"
[[ -n "${disks}" ]] ||
fatal "Keine geeigneten Datenträger erkannt."
printf '%s\n' "${disks}"
log "Phase 1: Datenträger werden nur angezeigt, nicht verändert."
log "Partitionierung ist noch deaktiviert."
}
main "$@"