V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 44s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 44s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -133,29 +133,22 @@ color_echo "${BLU}" "Dialog Output for Initialization START."
|
|||||||
if ! "${VAR_AUTO_INSTALL}"; then . ./lib/0200_dialog_helper.sh && dialog_box; fi
|
if ! "${VAR_AUTO_INSTALL}"; then . ./lib/0200_dialog_helper.sh && dialog_box; fi
|
||||||
|
|
||||||
### ARGUMENT CHECKS.
|
### ARGUMENT CHECKS.
|
||||||
color_echo "${BLU}" "ARGUMENT CHECKS."
|
|
||||||
arg_check "$@"
|
arg_check "$@"
|
||||||
declare -ar ARY_ARG_SANITIZED=("$@")
|
declare -ar ARY_ARG_SANITIZED=("$@")
|
||||||
declare -grx VAR_ARG_SANITIZED="${ARY_ARG_SANITIZED[*]}"
|
declare -grx VAR_ARG_SANITIZED="${ARY_ARG_SANITIZED[*]}"
|
||||||
|
|
||||||
### ARGUMENT PARSING.
|
### ARGUMENT PARSING.
|
||||||
color_echo "${BLU}" "ARGUMENT PARSING."
|
|
||||||
arg_parser "$@"
|
arg_parser "$@"
|
||||||
|
|
||||||
### PRIORITY UPDATES.
|
### PRIORITY UPDATES.
|
||||||
color_echo "${BLU}" "PRIORITY UPDATES."
|
|
||||||
arg_priority_check
|
arg_priority_check
|
||||||
|
|
||||||
### HASHING PASSWORDS.
|
### HASHING PASSWORDS.
|
||||||
color_echo "${BLU}" "PRIORITY UPDATES."
|
|
||||||
nuke_passphrase
|
nuke_passphrase
|
||||||
# TODO: Implement func() for other passwords.
|
# TODO: Implement func() for other passwords.
|
||||||
|
|
||||||
### MAIN PROGRAM SEQUENCE
|
### MAIN PROGRAM SEQUENCE
|
||||||
color_echo "${BLU}" "YAML PARSER."
|
|
||||||
yaml_parser
|
yaml_parser
|
||||||
|
|
||||||
color_echo "${BLU}" "YAML READER."
|
|
||||||
yaml_reader
|
yaml_reader
|
||||||
|
|
||||||
# TODO: Implement / Activate IP, Port validation
|
# TODO: Implement / Activate IP, Port validation
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ color_echo() {
|
|||||||
declare c="$1"
|
declare c="$1"
|
||||||
shift
|
shift
|
||||||
declare msg="${*}"
|
declare msg="${*}"
|
||||||
printf "%b[INFO]%b %b%s.%b%b" "${c}" "${RES}" "${WHI}" "${msg}" "${RES}" "${NL}"
|
printf "%b[INFO]%b %b%s %b%b" "${c}" "${RES}" "${WHI}" "${msg}" "${RES}" "${NL}"
|
||||||
}
|
}
|
||||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ arg_priority_check() {
|
|||||||
if [[ -n "${VAR_PRIORITY}" ]]; then
|
if [[ -n "${VAR_PRIORITY}" ]]; then
|
||||||
renice "${VAR_PRIORITY}" -p "$$" > /dev/null 2>&1
|
renice "${VAR_PRIORITY}" -p "$$" > /dev/null 2>&1
|
||||||
var=$(ps -o ni= -p $$) > /dev/null 2>&1
|
var=$(ps -o ni= -p $$) > /dev/null 2>&1
|
||||||
do_log "info" "tty" "New renice value: '${var}'."
|
do_log "info" "file_only" "New renice value: '${var}'."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Check if ionice PRIORITY is set and adjust ionice priority.
|
### Check if ionice PRIORITY is set and adjust ionice priority.
|
||||||
if [[ -n "${VAR_REIONICE_CLASS}" ]]; then
|
if [[ -n "${VAR_REIONICE_CLASS}" ]]; then
|
||||||
ionice -c"${VAR_REIONICE_CLASS}" -n"${VAR_REIONICE_PRIORITY}" -p "$$"
|
ionice -c"${VAR_REIONICE_CLASS}" -n"${VAR_REIONICE_PRIORITY}" -p "$$"
|
||||||
var=$(ionice -p $$) > /dev/null 2>&1
|
var=$(ionice -p $$) > /dev/null 2>&1
|
||||||
do_log "info" "tty" "New ionice value: '${var}'."
|
do_log "info" "file_only" "New ionice value: '${var}'."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ clean_screen() {
|
|||||||
dialog_gauge() {
|
dialog_gauge() {
|
||||||
clear
|
clear
|
||||||
declare -gx VAR_IN_DIALOG_WR="gauge"
|
declare -gx VAR_IN_DIALOG_WR="gauge"
|
||||||
declare -gr PIPE_DIALOG_GAUGE="/tmp/dialog_gauge_$$.fifo"
|
declare -gx PIPE_DIALOG_GAUGE="/tmp/dialog_gauge_$$.fifo"
|
||||||
if [[ -e "${PIPE_DIALOG_GAUGE}" && ! -p "${PIPE_DIALOG_GAUGE}" ]]; then
|
if [[ -e "${PIPE_DIALOG_GAUGE}" && ! -p "${PIPE_DIALOG_GAUGE}" ]]; then
|
||||||
rm -f "${PIPE_DIALOG_GAUGE}"
|
rm -f "${PIPE_DIALOG_GAUGE}"
|
||||||
fi
|
fi
|
||||||
@@ -53,7 +53,7 @@ dialog_gauge() {
|
|||||||
--gauge "Starting installation..." \
|
--gauge "Starting installation..." \
|
||||||
10 70 0 \
|
10 70 0 \
|
||||||
< "${PIPE_DIALOG_GAUGE}" &
|
< "${PIPE_DIALOG_GAUGE}" &
|
||||||
declare -gr PID_DIALOG_GAUGE="$!"
|
declare -gx PID_DIALOG_GAUGE="$!"
|
||||||
exec {FD_GAUGE}> "${PIPE_DIALOG_GAUGE}"
|
exec {FD_GAUGE}> "${PIPE_DIALOG_GAUGE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ dialog_box() {
|
|||||||
exec {FD_SAVE_OUT}>&1
|
exec {FD_SAVE_OUT}>&1
|
||||||
clear
|
clear
|
||||||
declare -gx VAR_IN_DIALOG_WR="box"
|
declare -gx VAR_IN_DIALOG_WR="box"
|
||||||
declare -gr PIPE_DIALOG_BOX="/tmp/dialog_box_$$.fifo"
|
declare -gx PIPE_DIALOG_BOX="/tmp/dialog_box_$$.fifo"
|
||||||
if [[ -e "${PIPE_DIALOG_BOX}" && ! -p "${PIPE_DIALOG_BOX}" ]]; then
|
if [[ -e "${PIPE_DIALOG_BOX}" && ! -p "${PIPE_DIALOG_BOX}" ]]; then
|
||||||
rm -f "${PIPE_DIALOG_BOX}"
|
rm -f "${PIPE_DIALOG_BOX}"
|
||||||
fi
|
fi
|
||||||
@@ -100,7 +100,7 @@ dialog_box() {
|
|||||||
--backtitle "CISS.2025.debian.installer" \
|
--backtitle "CISS.2025.debian.installer" \
|
||||||
--programbox "${ROWS_USE}" "${COLS_USE}" \
|
--programbox "${ROWS_USE}" "${COLS_USE}" \
|
||||||
< "${PIPE_DIALOG_BOX}" &
|
< "${PIPE_DIALOG_BOX}" &
|
||||||
declare -gr PID_DIALOG_BOX="$!"
|
declare -gx PID_DIALOG_BOX="$!"
|
||||||
### Redirect both stdout and stderr into FIFO
|
### Redirect both stdout and stderr into FIFO
|
||||||
exec 1> "${PIPE_DIALOG_BOX}" 2>&1
|
exec 1> "${PIPE_DIALOG_BOX}" 2>&1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user