V8.13.384.2025.11.06
Some checks failed
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m37s
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 1m9s
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Failing after 1m0s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-11-06 19:59:22 +01:00
parent d436346343
commit ef87becefe
93 changed files with 2021 additions and 1229 deletions

View File

@@ -13,26 +13,32 @@
guard_sourcing
#######################################
# IP Notation cleaner for pure IP output only
# IP notation cleaner for pure IP output only.
# Globals:
# ARY_HANDLER_JUMPHOST
# ARY_HANDLER_JUMPHOST_UNIQUE
# Arguments:
# None
# None
# Returns:
# 0: on success
#######################################
clean_ip() {
declare host
declare stripped
declare host="" stripped=""
for host in "${ARY_HANDLER_JUMPHOST[@]}"; do
# Remove leading '[' and trailing ']'
stripped="${host#\[}"
stripped="${stripped%\]}"
# Skip if it contains a slash (CIDR range)
if [[ ${stripped} == */* ]]; then
if [[ ${stripped} == */* ]]; then
continue
fi
# Directly append, no duplicate check
# shellcheck disable=SC2034
declare -ga ARY_HANDLER_JUMPHOST_UNIQUE+=("${stripped}")
done
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f clean_ip
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh