From: Antonio Alvarez Feijoo Date: Wed, 30 Nov 2022 10:20:29 +0000 (+0100) Subject: fix(dracut.sh): use DRACUT_ARCH instead of `uname -m` X-Git-Tag: 058~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a86aea65186b47ac210a3947c966311bb5371aeb;p=thirdparty%2Fdracut.git fix(dracut.sh): use DRACUT_ARCH instead of `uname -m` DRACUT_ARCH overrides `uname -m` since https://github.com/dracutdevs/dracut/commit/a0120420 --- diff --git a/dracut.sh b/dracut.sh index 5b10b5a6e..0381985e0 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1434,7 +1434,7 @@ if [[ ! $print_cmdline ]]; then fi unset EFI_MACHINE_TYPE_NAME EFI_SECTION_VMA_INITRD=0x3000000 - case $(uname -m) in + case "${DRACUT_ARCH:-$(uname -m)}" in x86_64) EFI_MACHINE_TYPE_NAME=x64 ;; @@ -1447,7 +1447,7 @@ if [[ ! $print_cmdline ]]; then EFI_SECTION_VMA_INITRD=0x4000000 ;; *) - dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable" + dfatal "Architecture '${DRACUT_ARCH:-$(uname -m)}' not supported to create a UEFI executable" exit 1 ;; esac @@ -1494,7 +1494,7 @@ if [[ $early_microcode == yes ]]; then && unset early_microcode fi # Do not complain on non-x86 architectures as it makes no sense - case $(uname -m) in + case "${DRACUT_ARCH:-$(uname -m)}" in x86_64 | i?86) [[ $early_microcode != yes ]] \ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"