diff options
Diffstat (limited to 'root/linux/dist.sh')
-rwxr-xr-x | root/linux/dist.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/root/linux/dist.sh b/root/linux/dist.sh new file mode 100755 index 0000000..e4d3b23 --- /dev/null +++ b/root/linux/dist.sh @@ -0,0 +1,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 |