Skip to content

Commit a86aea6

Browse files
aafeijoo-susejohannbg
authored andcommitted
fix(dracut.sh): use DRACUT_ARCH instead of uname -m
DRACUT_ARCH overrides `uname -m` since a0120420
1 parent 240a1d3 commit a86aea6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dracut.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ if [[ ! $print_cmdline ]]; then
14341434
fi
14351435
unset EFI_MACHINE_TYPE_NAME
14361436
EFI_SECTION_VMA_INITRD=0x3000000
1437-
case $(uname -m) in
1437+
case "${DRACUT_ARCH:-$(uname -m)}" in
14381438
x86_64)
14391439
EFI_MACHINE_TYPE_NAME=x64
14401440
;;
@@ -1447,7 +1447,7 @@ if [[ ! $print_cmdline ]]; then
14471447
EFI_SECTION_VMA_INITRD=0x4000000
14481448
;;
14491449
*)
1450-
dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable"
1450+
dfatal "Architecture '${DRACUT_ARCH:-$(uname -m)}' not supported to create a UEFI executable"
14511451
exit 1
14521452
;;
14531453
esac
@@ -1494,7 +1494,7 @@ if [[ $early_microcode == yes ]]; then
14941494
&& unset early_microcode
14951495
fi
14961496
# Do not complain on non-x86 architectures as it makes no sense
1497-
case $(uname -m) in
1497+
case "${DRACUT_ARCH:-$(uname -m)}" in
14981498
x86_64 | i?86)
14991499
[[ $early_microcode != yes ]] \
15001500
&& dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"

0 commit comments

Comments
 (0)