Kexec/kexec-load: Difference between revisions

From Alpine Linux
m (Testing the potential to move the kexec-load script from the Kexec page and then transcluding it.)
m (Try to fill the kernel and initrd/initramfs automagically for the user.)
Line 3: Line 3:
# Define defaults
# Define defaults
: "${BOOTPART:=/boot}"
: "${BOOTPART:=/boot}"
: "${KERNEL:=vmlinuz-edge}"
: "${KERNEL:=vmlinuz-$(uname -r | awk -F \- '{print $NF }')}"
: "${INITRD:=initramfs-edge}"
: "${INITRD:=initrfamfs-$(uname -r | awk -F \- '{print $NF}')}"


depend() {
depend() {

Revision as of 19:33, 2 January 2024

#!/sbin/openrc-run description="kexec for faster reboot" # Define defaults : "${BOOTPART:=/boot}" : "${KERNEL:=vmlinuz-$(uname -r | awk -F \- '{print $NF }')}" : "${INITRD:=initrfamfs-$(uname -r | awk -F \- '{print $NF}')}" depend() { need localmount } start() { : } stop() { if ! yesno ${RC_GOINGDOWN}; then einfo "kexec-load: Not rebooting or powering off; not loading kernel" exit fi ebegin "kexec-load: loading kernel for faster reboot" kexec -l "${BOOTPART}/${KERNEL}" \ --initrd "${BOOTPART}/${INITRD}" \ --reuse-cmdline ewend $? Failed. }