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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-06 11:00:29 +02:00
parent 712c2057ec
commit 1ce64e97cc
2 changed files with 53 additions and 23 deletions

View File

@@ -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}" | tee -a "${VAR_DIALOG}" printf "%b[INFO]%b %s %b" "${c}" "${RES}" "${msg}" "${NL}" | tee -a "${VAR_DIALOG}"
} }
# 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

View File

@@ -32,6 +32,15 @@ check_kernel() {
var_cpu_vendor=$(</proc/cpuinfo grep 'vendor_id' | head -n1 | cut -d: -f2 | xargs) var_cpu_vendor=$(</proc/cpuinfo grep 'vendor_id' | head -n1 | cut -d: -f2 | xargs)
var_system_architecture="$(dpkg --print-architecture)" var_system_architecture="$(dpkg --print-architecture)"
cat << 'EOF' >| "${VAR_DIALOG}"
Kernel available
*+bpo* : Debian Backported Kernel
*cloud* : Special lightweight images for KVM
*unsigned* : Unsigned Kernel
*preempt_rt* : Special Kernel for real-time-computing
Not unsigned marked are MS signed Kernel for Secure Boot
EOF
case "${var_system_architecture}" in case "${var_system_architecture}" in
amd64) amd64)
@@ -57,36 +66,57 @@ check_kernel() {
return 42 return 42
} }
while IFS= read -r line; do while IFS= read -r line; do
first_string=${line%% *} first_string=${line%% *}
name=${first_string#linux-image-} name=${first_string#linux-image-}
options+=("${name}" "${counter}" off) options+=("${name}" "${counter}" off)
((counter++)) ((counter++))
done < "${VAR_KERNEL_SRT}" done < "${VAR_KERNEL_SRT}"
while true; do
# shellcheck disable=SC2034 # shellcheck disable=SC2034
if VAR_KERNEL=$(dialog \ if VAR_KERNEL=$(dialog \
--no-collapse \ --no-collapse \
--ascii-lines \ --ascii-lines \
--clear \ --clear \
--help-button --help-label "Info" \ --help-button --help-label "Info" \
--backtitle "CISS.debian.installer" \ --backtitle "CISS.debian.installer" \
--title "Select the Kernel for the CISS.debian.installer" \ --title "Select the Kernel for the CISS.debian.installer" \
--radiolist "Kernel available \n *+bpo* : Debian Backported Kernel \n *cloud* : Special lightweight images for KVM \n *unsigned* : Unsigned Kernel \n *preempt_rt* : Special Kernel for real-time-computing \n Not unsigned marked are MS signed Kernel for Secure Boot \n" 0 0 "${options[@]}" 3>&1 1>&2 2>&3 3>&-) --radiolist "Kernel available \n *+bpo* : Debian Backported Kernel \n *cloud* : Special lightweight images for KVM \n *unsigned* : Unsigned Kernel \n *preempt_rt* : Special Kernel for real-time-computing \n Not unsigned marked are MS signed Kernel for Secure Boot \n" 0 0 "${options[@]}" 3>&1 1>&2 2>&3 3>&-)
then then
clear clear
[[ "${VAR_KERNEL}" != linux-image-* ]] && VAR_KERNEL="linux-image-${VAR_KERNEL}" [[ "${VAR_KERNEL}" != linux-image-* ]] && VAR_KERNEL="linux-image-${VAR_KERNEL}"
do_log "info" "file_only" "0110() Kernel image selected interactively: '${VAR_KERNEL}'." do_log "info" "file_only" "0110() Kernel image selected interactively: '${VAR_KERNEL}'."
break
else else
clear if (( "$?" == 1 )); then
VAR_KERNEL=""
fi clear
VAR_KERNEL=""
break
elif (( "$?" == 2 )); then
clear
dialog --no-collapse \
--ascii-lines \
--clear \
--backtitle "CISS.debian.installer" \
--title "Select the Kernel for the CISS.debian.installer" \
--scrollbar \
--textbox "${VAR_DIALOG}" 32 128
clear
continue
fi
fi
done
# shellcheck disable=SC2312 # shellcheck disable=SC2312
cat "${VAR_DIALOG}" | tail -n 30 cat "${VAR_DIALOG}" | tail -n 30