From ab1b0eea48826c57d40b7a10002044850fb70ffb Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sun, 9 Feb 2025 15:02:40 +0100 Subject: [PATCH] init/boot: update Signed-off-by: AuxXxilium --- files/initrd/opt/arc/boot.sh | 5 ++--- files/initrd/opt/arc/init.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/files/initrd/opt/arc/boot.sh b/files/initrd/opt/arc/boot.sh index a20d57f3..9df68b14 100755 --- a/files/initrd/opt/arc/boot.sh +++ b/files/initrd/opt/arc/boot.sh @@ -13,7 +13,7 @@ rm -rf "${PART1_PATH}/logs" >/dev/null 2>&1 || true # Get Loader Disk Bus [ -z "${LOADER_DISK}" ] && die "Loader Disk not found!" BUS=$(getBus "${LOADER_DISK}") -EFI=$([ -d /sys/firmware/efi ] && echo 1 || echo 0) +[ -d /sys/firmware/efi ] && EFI="1" || EFI="0" # Print Title centralized clear @@ -333,8 +333,7 @@ elif [ "${DIRECTBOOT}" = "false" ]; then echo -e "\033[1;37mLoading DSM Kernel...\033[0m" KEXECARGS="-a" - if [ $(echo "${KVER:-4}" | cut -d'.' -f1) -lt 4 ] && [ ${EFI} -eq 1 ]; then - echo -e "\033[1;33mWarning, running kexec with --noefi param, strange things will happen!!\033[0m" + if [ ${EFI} -eq 0 ]; then KEXECARGS+=" --noefi" fi kexec ${KEXECARGS} -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE} kexecboot" >"${LOG_FILE}" 2>&1 || dieLog diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index ffcde12e..33756fec 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -14,7 +14,7 @@ arc_mode || die "No bootmode found!" [ -f "${USER_CONFIG_FILE}" ] && sed -i "s/'/\"/g" "${USER_CONFIG_FILE}" >/dev/null 2>&1 || true BUS=$(getBus "${LOADER_DISK}") -EFI=$([ -d /sys/firmware/efi ] && echo 1 || echo 0) +[ -d /sys/firmware/efi ] && EFI="1" || EFI="0" # Print Title centralized clear