Skip to content

Commit eb1997c

Browse files
ajs124Mic92
authored andcommitted
move kexec check into kexec codepath
without this, the check gets run and fails even if no kexec will be done e.g. when an installer is booted
1 parent 04f9809 commit eb1997c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/nixos-anywhere.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ if [[ ${is_os-n} != "Linux" ]]; then
301301
abort "This script requires Linux as the operating system, but got $is_os"
302302
fi
303303

304-
if [[ ${is_arch-n} != "x86_64" ]] && [[ $kexec_url == "$default_kexec_url" ]]; then
305-
abort "The default kexec image only support x86_64 cpus. Checkout https://github.com/numtide/nixos-anywhere/#using-your-own-kexec-image for more information."
306-
fi
307-
308304
if [[ ${is_kexec-n} == "n" ]] && [[ ${is_installer-n} == "n" ]]; then
305+
if [[ ${is_arch-n} != "x86_64" ]] && [[ $kexec_url == "$default_kexec_url" ]]; then
306+
abort "The default kexec image only support x86_64 cpus. Checkout https://github.com/numtide/nixos-anywhere/#using-your-own-kexec-image for more information."
307+
fi
308+
309309
step Switching system into kexec
310310
ssh_ <<SSH
311311
set -efu ${enable_debug}

0 commit comments

Comments
 (0)