scripts/kexec/kexec-latest.sh
2023-04-15 10:05:08 -05:00

12 lines
321 B
Bash
Executable file

#!/bin/bash
set -x
NEWEST_KERNEL_VERSION="$(
rpm --query --queryformat='%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel \
| sort --version-sort --reverse \
| head --lines=1
)"
kexec --load --append="`cat /proc/cmdline`" \
--initrd="/boot/initramfs-$NEWEST_KERNEL_VERSION.img" \
"/boot/vmlinuz-$NEWEST_KERNEL_VERSION"