V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m22s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m22s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -38,16 +38,17 @@ guard_sourcing
|
||||
# VAR_SETUP_PATH
|
||||
# grub_background_enable
|
||||
# grub_background_path
|
||||
# grub_latest
|
||||
# grub_bootdev
|
||||
# grub_force_efi
|
||||
# grub_prober
|
||||
# grub_skip
|
||||
# grub_update_nvram
|
||||
# var_update_grub_required
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# 0: on success
|
||||
# ERR_GRUB_BACKGROUND
|
||||
# ERR_GRUB_EFI_FORCE
|
||||
# ERR_GRUB_ARCHITECTURE: on failure
|
||||
#######################################
|
||||
installation_grub() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
@@ -78,7 +79,8 @@ installation_grub() {
|
||||
chroot_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends grub2-common grub-efi-amd64 grub-efi-amd64-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
|
||||
RC=( \${PIPESTATUS[@]} )
|
||||
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
|
||||
"
|
||||
;;
|
||||
|
||||
@@ -86,7 +88,8 @@ installation_grub() {
|
||||
chroot_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends grub2-common grub-efi-arm64 grub-efi-arm64-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
|
||||
RC=( \${PIPESTATUS[@]} )
|
||||
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
|
||||
"
|
||||
;;
|
||||
|
||||
@@ -101,7 +104,8 @@ installation_grub() {
|
||||
chroot_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends grub2-common grub-pc grub-pc-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode of PIPESTATUS[0]: \${PIPESTATUS[0]} >> ${var_logfile}
|
||||
RC=( \${PIPESTATUS[@]} )
|
||||
echo ExitCode of PIPESTATUS[0]: \${RC[0]} >> ${var_logfile}
|
||||
"
|
||||
|
||||
fi
|
||||
@@ -210,6 +214,9 @@ EOF
|
||||
|
||||
guard_dir && return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f installation_grub
|
||||
|
||||
#######################################
|
||||
# Installs GRUB to BIOS in BIOS mode.
|
||||
@@ -222,7 +229,7 @@ EOF
|
||||
# None
|
||||
# Returns:
|
||||
# 0: on success
|
||||
# ERR_GRUB_INSTALL
|
||||
# ERR_GRUB_INSTALL: on failure
|
||||
#######################################
|
||||
install_grub_bios() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
@@ -253,6 +260,9 @@ install_grub_bios() {
|
||||
|
||||
return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f install_grub_bios
|
||||
|
||||
#######################################
|
||||
# Installs GRUB to ESP in UEFI mode.
|
||||
@@ -260,14 +270,13 @@ install_grub_bios() {
|
||||
# TARGET
|
||||
# VAR_MODINFO_PATH
|
||||
# grub_bootdev
|
||||
# grub_force_efi
|
||||
# grub_update_nvram
|
||||
# var_update_grub_required
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# 0: on success
|
||||
# ERR_GRUB_INSTALL
|
||||
# ERR_GRUB_INSTALL: on failure
|
||||
#######################################
|
||||
install_grub_uefi() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
@@ -300,6 +309,9 @@ install_grub_uefi() {
|
||||
|
||||
return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f install_grub_uefi
|
||||
|
||||
#######################################
|
||||
# Get the path of the required Grub modules.
|
||||
@@ -316,6 +328,7 @@ get_grub_modinfo_path() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare -gx VAR_MODINFO_PATH=""
|
||||
|
||||
# shellcheck disable=SC2249
|
||||
case "${VAR_RECIPE_FIRMWARE}" in
|
||||
|
||||
uefi)
|
||||
@@ -339,4 +352,7 @@ get_grub_modinfo_path() {
|
||||
|
||||
return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f get_grub_modinfo_path
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
Reference in New Issue
Block a user