PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /usr/local/bin/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //usr/local/bin/kreboot

#!/bin/bash
###
### kexec wrapper for faster reboots.
###
kernel=""
for arg in "$@"; do
    case "$arg" in
        "latest" )
            kernel="latest"
        ;;
        "current" )
            kernel="current"
        ;;
        --help | -h)
            echo "kreboot: Immediately sync then reinitialize the current or latest kernel using kexec instead of a hardware reboot"
            echo "usage: kreboot [current|latest]"
            echo "The purpose of this tool is to provide the option of faster recovery in reboots unrelated to hardware issues"
        ;;
        * )
            echo "usage: kreboot [current|latest]"
        ;;
   esac
done

if [[ -z $kernel ]]; then
    echo "Please select a kernel between \"current\" or \"latest\"."
else
    echo "Loading $kernel kernel"
    if [[ $kernel == "current" ]]; then
        set -x
        kexec -l /boot/vmlinuz-$(uname -r) --initrd=/boot/initramfs-$(uname -r).img --reuse-cmdline && sync && kexec -e
    elif [[ $kernel == "latest" ]]; then
        set -x
        kexec -l $(find /boot/vmlinuz-* | sort -V | tail -1) --initrd=$(find /boot/initramfs-*.img -not -name "*kdump.img" | sort -V | tail -1) --reuse-cmdline && sync && kexec -e
    fi
fi