summaryrefslogblamecommitdiffstats
path: root/root/linux/dist.sh
blob: 653807366cdb18d714da2c71a0231bdff60992d3 (plain) (tree)
1
2
3
4
5
6
7
8






                                                 
                                               


                                    
#!/bin/sh
set -xe
k=`eselect kernel list | tail -n1 | cut -d\  -f6`
m=`cut -d- -f2- <<<$k`
p=`rev <<<$0 | cut -d/ -f1 | rev`
d=`mktemp -d -p "" $p.XXX`
pushd $d
dracut --force --kver $m /boot/initramfs-$m.img
grub-mkconfig -o /boot/grub/grub.cfg
popd
rm -fr $d