[SM-Commit] GIT changes to master grimoire by Daniel Goller (c96f8ed433e16783c099afef15d69d0235233cc2)

Daniel Goller scm at mail.sourcemage.org
Wed Oct 4 21:34:12 EDT 2006


GIT changes to master grimoire by Daniel Goller <morfic at sourcemage.org>:

 FUNCTIONS |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit c96f8ed433e16783c099afef15d69d0235233cc2
Author: Daniel Goller <morfic at sourcemage.org>
Commit: Daniel Goller <morfic at sourcemage.org>

     grimoire/FUNCTIONS: add part to ifelseheimer to get version from /usr/src/linux/.config
    	so we can go and compile all modules for the new kernel before we reboot
    	and are this way not stuck w/o network/* and who does not setup /usr/src/linux is
    	stuck with uname -r as before

diff --git a/FUNCTIONS b/FUNCTIONS
index 37ef827..f528ab1 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -295,8 +295,13 @@ function get_kernel_version()
 		if [[ $KVER ]] ; then
 			echo $KVER
 		else
-			KVER=$(uname -r)
-			echo $KVER
+			KVER=$(grep version /usr/src/linux/.config | cut -d: -f2 | cut -d ' ' -f2)
+			if [ $KVER ] && [ -d "/lib/modules/${KVER}/build" ] ; then
+				 echo $KVER
+			else
+				KVER=$(uname -r)
+				echo $KVER
+			fi
 		fi
 	fi
 }



More information about the SM-Commit mailing list