16 lines
393 B
Bash
16 lines
393 B
Bash
#!/bin/bash
|
|
cd /boot
|
|
if [ -f kernel ];then
|
|
rm kernel
|
|
fi
|
|
yenimodul=`ls -Art /lib/modules/ | tail -n 1`
|
|
yenikernel=`ls -Art /boot/kernel* | tail -n 1`
|
|
modulno=`basename $yenimodul`
|
|
kernelno=`basename $yenikernel`
|
|
ln -s $kernelno kernel
|
|
if [ -f initramfs ];then
|
|
mv initramfs initramfs_eski
|
|
fi
|
|
dracut -N --force --xz --omit systemd /boot/initramfs $modulno
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|