Skip to content

Commit abdec7b

Browse files
authored
Merge pull request #146 from ajs124/fix/kexec-check
move kexec check into kexec codepath
2 parents 04f9809 + eb1997c commit abdec7b

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)