From 547425185390511d189331775ca8301c86c31993 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 8 Apr 2019 18:03:30 -0400 Subject: Update kernel_upgrade to support dkms. Also add kernel package --- kernel_upgrade.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kernel_upgrade.sh') diff --git a/kernel_upgrade.sh b/kernel_upgrade.sh index d956a10..dab1518 100755 --- a/kernel_upgrade.sh +++ b/kernel_upgrade.sh @@ -1,5 +1,4 @@ #!/bin/sh -# Basic script to update the kernel on a Void Linux system somewhat automatically set -e set -x version="$(sed 11q Makefile \ @@ -11,7 +10,7 @@ version="$(sed 11q Makefile \ | sed -e's/\.$//')" localversion="$(sed 25q .config \ | sed -rn \ - -e's/^CONFIG_LOCALVERSION=".*"$//p')" + -e's/^CONFIG_LOCALVERSION="(.*)"$/\1/p')" if [ -z "$version" ] ; then exit 1; fi @@ -19,6 +18,9 @@ CPUs="$(nproc)" # git checkout v$version make -j$CPUs "$@" olddefconfig bzImage modules sudo make -j$CPUs install modules_install +cd / +sudo sh -c 'umask 002; sh /etc/kernel.d/post-install/10-dkms linux '"${version}${localversion}" +cd - sudo dracut -f --kver "${version}${localversion}" sudo grub-mkconfig -o /boot/grub/grub.cfg -# echo "You'll have to update grub by hand there bud" +echo "You'll have to update grub by hand there bud" -- cgit v1.2.3