V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 3m11s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 3m11s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -117,8 +117,8 @@ grub_extract_current_string() {
|
|||||||
grub_finalize_string() {
|
grub_finalize_string() {
|
||||||
### Declare Arrays, HashMaps, and Variables.
|
### Declare Arrays, HashMaps, and Variables.
|
||||||
declare var_file="${TARGET}/etc/default/grub.d/99-ciss-cmdline.cfg"
|
declare var_file="${TARGET}/etc/default/grub.d/99-ciss-cmdline.cfg"
|
||||||
declare var_linux="${VV_GRUB_CMDLINE_LINUX//\'/\'\"\'\"\'}"
|
#declare var_linux="${VV_GRUB_CMDLINE_LINUX//\'/\'\"\'\"\'}"
|
||||||
declare var_linux_default="${VV_GRUB_CMDLINE_LINUX_DEFAULT//\'/\'\"\'\"\'}"
|
#declare var_linux_default="${VV_GRUB_CMDLINE_LINUX_DEFAULT//\'/\'\"\'\"\'}"
|
||||||
declare -gx VAR_GRUB_CMDLINE_LINUX="${VK_GRUB_CMDLINE_LINUX}'${VV_GRUB_CMDLINE_LINUX}'"
|
declare -gx VAR_GRUB_CMDLINE_LINUX="${VK_GRUB_CMDLINE_LINUX}'${VV_GRUB_CMDLINE_LINUX}'"
|
||||||
declare -gx VAR_GRUB_CMDLINE_LINUX_DEFAULT="${VK_GRUB_CMDLINE_LINUX_DEFAULT}'${VV_GRUB_CMDLINE_LINUX_DEFAULT}'"
|
declare -gx VAR_GRUB_CMDLINE_LINUX_DEFAULT="${VK_GRUB_CMDLINE_LINUX_DEFAULT}'${VV_GRUB_CMDLINE_LINUX_DEFAULT}'"
|
||||||
|
|
||||||
@@ -134,9 +134,9 @@ EOF
|
|||||||
|
|
||||||
umask 0022
|
umask 0022
|
||||||
{
|
{
|
||||||
printf 'GRUB_CMDLINE_LINUX="%s"\n' "${var_linux}"
|
printf "GRUB_CMDLINE_LINUX='%q'\n" "${VAR_GRUB_CMDLINE_LINUX}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf 'GRUB_CMDLINE_LINUX_DEFAULT="%s"\n' "${var_linux_default}"
|
printf "GRUB_CMDLINE_LINUX_DEFAULT='%q'\n" "${VAR_GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh\n"
|
printf "# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh\n"
|
||||||
} >> "${var_file}"
|
} >> "${var_file}"
|
||||||
|
|||||||
@@ -60,13 +60,17 @@ update_grub_bootparameter() {
|
|||||||
|
|
||||||
if [[ "${VAR_NUKE}" == "true" ]]; then
|
if [[ "${VAR_NUKE}" == "true" ]]; then
|
||||||
### 1) Escape every '$' so GRUB won't expand it.
|
### 1) Escape every '$' so GRUB won't expand it.
|
||||||
var_nuke_esc="${VAR_NUKE_HASH//$/\\$}"
|
#var_nuke_esc="${VAR_NUKE_HASH//$/\\$}"
|
||||||
|
|
||||||
### 2) Wrap the value in single quotes, so the dollar signs survive GRUB parsing.
|
### 2) Wrap the value in single quotes, so the dollar signs survive GRUB parsing.
|
||||||
var_nuke_string="nuke='${var_nuke_esc}'"
|
#var_nuke_string="nuke='${var_nuke_esc}'"
|
||||||
|
|
||||||
### 3) Append to accumulating cmdline variable. Space-prefix ensures clean concatenation.
|
### 3) Append to accumulating cmdline variable. Space-prefix ensures clean concatenation.
|
||||||
VV_GRUB_CMDLINE_LINUX+=" ${var_nuke_string}"
|
|
||||||
|
|
||||||
|
var_nuke_string="nuke=${VAR_NUKE_HASH}"
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
VV_GRUB_CMDLINE_LINUX="${VV_GRUB_CMDLINE_LINUX} ${var_nuke_string}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grub_finalize_string
|
grub_finalize_string
|
||||||
|
|||||||
Reference in New Issue
Block a user