$51 GRAYBYTE WORDPRESS FILE MANAGER $37

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/kernel/install.d/

HOME
Current File : /lib/kernel/install.d//20-grubby.install
#!/bin/bash

if [[ ! -x /sbin/new-kernel-pkg ]]; then
    exit 0
fi

COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"

KERNEL_DIR="${KERNEL_IMAGE%/*}"
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
case "$COMMAND" in
    add)
        if [[ "${KERNEL_DIR}" != "/boot" ]]; then
            for i in \
                "$KERNEL_IMAGE" \
                    "$KERNEL_DIR"/System.map \
                    "$KERNEL_DIR"/config \
                    "$KERNEL_DIR"/zImage.stub \
                    "$KERNEL_DIR"/dtb \
                ; do
                [[ -e "$i" ]] || continue
                cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
                command -v restorecon &>/dev/null && \
                    restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}"
            done
            # hmac is .vmlinuz-<version>.hmac so needs a special treatment
            i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
            if [[ -e "$i" ]]; then
                cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
                command -v restorecon &>/dev/null && \
                    restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
            fi
            # symvers is symvers-<version>.gz so needs a special treatment
            i="$KERNEL_DIR/symvers.gz"
            if [[ -e "$i" ]]; then
                cp -a "$i" "/boot/symvers-${KERNEL_VERSION}.gz"
                command -v restorecon &>/dev/null && \
                    restorecon "/boot/symvers-${KERNEL_VERSION}.gz"
            fi
        fi
        /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
        /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
        /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
        ;;
    remove)
        /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
        ;;
    *)
        ;;
esac

# skip other installation plugins, if we can't find a boot loader spec conforming setup
if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
    exit 77
fi

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
5 Nov 2025 4.26 PM
root / root
0755
20-grub.install
7.807 KB
21 Oct 2025 8.34 PM
root / root
0755
20-grubby.install
2.199 KB
5 Nov 2025 4.26 PM
root / root
0755
50-depmod.install
0.359 KB
22 Jun 2018 6.11 PM
root / root
0755
50-dracut.install
1.618 KB
15 Jul 2025 4.09 PM
root / root
0755
51-dracut-rescue.install
3.613 KB
15 Jul 2025 4.09 PM
root / root
0755
60-kdump.install
0.772 KB
24 Sep 2024 3.36 PM
root / root
0755
90-loaderentry.install
1.929 KB
5 Nov 2025 4.25 PM
root / root
0755
92-tuned.install
1.367 KB
22 Feb 2024 7.23 PM
root / root
0755
99-grub-mkconfig.install
1.06 KB
21 Oct 2025 8.34 PM
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF