| Server IP : 77.50.203.18 / Your IP : 192.168.0.10 Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23 System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64 User : warsnews.ru ( 1001) PHP Version : 8.4.23 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/usr/lib/kernel/install.d/ |
Upload File : |
#!/usr/bin/bash
[[ -f /etc/default/grub ]] && . /etc/default/grub
[[ -f /etc/os-release ]] && . /etc/os-release
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
case "$COMMAND" in
add)
if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then
entry=$(grub2-editenv list | grep tmp_saved_entry)
if [ -n "$entry" ]; then
BLS_ID=${entry##tmp_saved_entry=}
BLS_DIR="/boot/loader/entries"
BLS_TARGET="${BLS_DIR}/${BLS_ID}.conf"
LINUX="$(grep '^linux[ \t]' "${BLS_TARGET}" | sed -e 's,^linux[ \t]*,,' | awk '{print $1}')"
INITRD="$(grep '^initrd[ \t]' "${BLS_TARGET}" | sed -e 's,^initrd[ \t]*,,' | awk '{print $1}')"
ROOTPREFIX=""
[ -z "$(grub2-mkrelpath /boot)" ] && ROOTPREFIX="/boot"
if [ -e "${ROOTPREFIX}${LINUX}" -a -n "${INITRD}" ]; then
if [ ! -e "${ROOTPREFIX}${INITRD}" ]; then
echo "Error: ${ROOTPREFIX}${INITRD} not found."
exit 1
fi
if ! lsinitrd ${ROOTPREFIX}${INITRD} > /dev/null; then
echo "Error: ${ROOTPREFIX}${INITRD} appears to be corrupt."
exit 1
fi
fi
grub2-editenv - unset "tmp_saved_entry"
grub2-editenv - set "saved_entry=$BLS_ID"
fi
fi
;;
*)
;;
esac