Skip to content

Commit

Permalink
comment kexec code
Browse files Browse the repository at this point in the history
  • Loading branch information
UriHerrera committed Aug 20, 2023
1 parent 14db765 commit 3c4b4fb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions usr/bin/nuts-cru
Original file line number Diff line number Diff line change
Expand Up @@ -387,17 +387,17 @@ update-grub >"$OUTPUT_FILE" 2>&1
# -- Check if kexec exists and continue if not.
# -- Check if using Nvidia hardware, if true don't use kexec.

if [ "$(get_gpu_manufacturer)" == "NVIDIA" ]; then
puts_warning "Nvidia GPU detected. Cannot use kexec; the kernel cannot be replaced live. Reboot to load the new kernel."
else
if command -v kexec >"$OUTPUT_FILE"; then
KERNEL_PARAMETERS=$(tail -n 1 /proc/cmdline)
kexec -l --initrd="$KEXEC_INITRD" --append="@${KERNEL_PARAMETERS}" "$KEXEC_VMLINUZ"
kexec -e
else
puts_error "Can't find kexec; the kernel cannot be replaced live. Reboot to load the new kernel."
fi
fi
# if [ "$(get_gpu_manufacturer)" == "NVIDIA" ]; then
# puts_warning "Nvidia GPU detected. Cannot use kexec; the kernel cannot be replaced live. Reboot to load the new kernel."
# else
# if command -v kexec >"$OUTPUT_FILE"; then
# KERNEL_PARAMETERS=$(tail -n 1 /proc/cmdline)
# kexec -l --initrd="$KEXEC_INITRD" --append="@${KERNEL_PARAMETERS}" "$KEXEC_VMLINUZ"
# kexec -e
# else
# puts_error "Can't find kexec; the kernel cannot be replaced live. Reboot to load the new kernel."
# fi
# fi


# -- Unmount all the stuff.
Expand Down

0 comments on commit 3c4b4fb

Please sign in to comment.