[SM-Grimoire-Bugs] [Bug 10940] get_kernel_version isn't flexible enough

bugzilla-daemon at bugs.sourcemage.org bugzilla-daemon at bugs.sourcemage.org
Tue Oct 17 15:40:31 EDT 2006


------- Additional Comments From iuso at sourcemage.org  2006-10-17 14:40 -------
(In reply to comment #10)
> I would suggest doing it the way dkowis suggested:

Woot, someone brain-switched me and dkowis. ;)

But to get back to the subject. This is what get_running_kernel_config appears 
to do to retrieve the kernel version:

	local KVER
	# use proc interface because even inside a uname change invoke this
	# still returns the version of the running kernel
	if [ -f /proc/sys/kernel/osrelease ] ; then
		KVER=$(cat /proc/sys/kernel/osrelease)
		# apparently you don't have proc mount
		KVER=$(uname -r)

Is this approach in your opinion better or worse than the one in 

> 1) check for a user controlled var
> 2) check for sorcery version (something we know will work)
> 3) check for linux source file in some generic way that it should work 80% 
> the time

Could you write the code for the last part? I don't know what works well 

One thing I also believe we should do is split get_kernel_version into 
get_sorcery_kernel_version and get_running_kernel_version and make 
get_kernel_version simply call those. This is because 
get_sorcery_kernel_config and get_running_kernel_config also need to know the 
proper kernel versions. They could do that by calling these split *_version 

Hope I'm still making sense. What I really only need is for someone 
knowledgeable enough to write that running kernel version code, I'll do the 

Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the SM-Grimoire-Bugs mailing list