Kexec/kexec-load
#!/sbin/openrc-run
description="kexec for faster reboot"
# Define defaults
: "${BOOTPART:=/boot}"
: "${KERNEL:=vmlinuz-edge}"
: "${INITRD:=initramfs-edge}"
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.
}