summaryrefslogtreecommitdiffstats
path: root/root/linux/dist.sh
blob: e4d3b23ec8611f4d1262443edf3ef18e229ca8fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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 $m
mv $m /boot/initramfs-$m.img
grub-mkconfig -o /boot/grub/grub.cfg
popd
rm -fr $d