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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-09-05 17:23:28 +02:00
parent 5ba56bacb2
commit 000c9d26ed

View File

@@ -28,12 +28,14 @@ nuke_passphrase() {
declare -r var_nuke_pwd_file="${DIR_CNF}/password_luks_nuke.txt" declare -r var_nuke_pwd_file="${DIR_CNF}/password_luks_nuke.txt"
declare var_temp_nuke_hash="" var_temp_plain_nuke_pwd="" var_salt="" var_nuke_rounds="" declare var_temp_nuke_hash="" var_temp_plain_nuke_pwd="" var_salt="" var_nuke_rounds=""
# shellcheck disable=SC2016,SC2312 # shellcheck disable=SC2312
var_nuke_rounds="$( var_nuke_rounds="$(
yq -r ' yq -r '
paths(scalars) as $p .. # recursive descent over all nodes
| select( ($p|last|tostring) | test("_nuke_rounds$") ) | select(tag == "!!map") # keep only mapping nodes
| getpath($p) | to_entries[] # iterate key/value pairs
| select(.key | test("_nuke_rounds$")) # match key suffix
| .value # output the value
' "${DIR_CNF}/preseed.yaml" | head -n1 ' "${DIR_CNF}/preseed.yaml" | head -n1
)" )"