Merge pull request #146 from ajs124/fix/kexec-check

move kexec check into kexec codepath
This commit is contained in:
Jörg Thalheim 2023-07-12 20:07:58 +01:00 committed by GitHub
commit abdec7bf3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,11 +301,11 @@ if [[ ${is_os-n} != "Linux" ]]; then
abort "This script requires Linux as the operating system, but got $is_os"
fi
if [[ ${is_arch-n} != "x86_64" ]] && [[ $kexec_url == "$default_kexec_url" ]]; then
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."
fi
if [[ ${is_kexec-n} == "n" ]] && [[ ${is_installer-n} == "n" ]]; then
if [[ ${is_arch-n} != "x86_64" ]] && [[ $kexec_url == "$default_kexec_url" ]]; then
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."
fi
step Switching system into kexec
ssh_ <<SSH
set -efu ${enable_debug}