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-09-05 21:35:38 +02:00
parent 72a84b7925
commit d0b363d7d4
19 changed files with 237 additions and 123 deletions

View File

@@ -54,9 +54,8 @@ generate_salt() {
read_password_file() {
declare -r var_input_file="${1}"
declare -n var_output_file="${2}"
declare -a lines=()
declare -a ary_lines=()
### TODO: PASSWORD REMINDER START
guard_trace on
if [[ ! -f "${var_input_file}" ]]; then
@@ -66,16 +65,16 @@ read_password_file() {
fi
mapfile -t lines < "${var_input_file}"
mapfile -t ary_lines < "${var_input_file}"
if (( ${#lines[@]} != 1 )); then
if (( ${#ary_lines[@]} != 1 )); then
do_log "fatal" "file_only" "0104() Password file '${var_input_file}' MUST contain exactly one line."
return "${ERR_READ_PASS_FILE}"
fi
var_output_file="${lines[0]}"
var_output_file="${ary_lines[0]}"
### Trim leading and trailing whitespace.
var_output_file="${var_output_file#"${var_output_file%%[![:space:]]*}"}" ### leading
var_output_file="${var_output_file%"${var_output_file##*[![:space:]]}"}" ### trailing
@@ -87,7 +86,6 @@ read_password_file() {
fi
### TODO: PASSWORD REMINDER STOP
guard_trace off
sync
@@ -104,7 +102,7 @@ read_password_file() {
sync
unset lines
unset ary_lines
return 0
}