use early return in runKexec

This commit is contained in:
Jörg Thalheim 2024-09-10 06:22:06 +02:00 committed by mergify[bot]
parent ef708ac46d
commit bc77bd1cca

View File

@ -375,7 +375,10 @@ importFacts() {
}
runKexec() {
if [[ ${isKexec-n} == "n" ]] && [[ ${isInstaller-n} == "n" ]]; then
if [[ ${isKexec-n} == "y" ]] || [[ ${isInstaller-n} == "y" ]]; then
return
fi
if [[ ${isContainer-none} != "none" ]]; then
echo "WARNING: This script does not support running from a '${isContainer}' container. kexec will likely not work" >&2
fi
@ -433,7 +436,6 @@ SSH
# waiting for machine to become available again
until runSsh -o ConnectTimeout=10 -- exit 0; do sleep 5; done
fi
}
runDisko() {