[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 16:32:20 EDT 2006


http://bugs.sourcemage.org/show_bug.cgi?id=10940





------- Additional Comments From dmlb2000 at gmail.com  2006-10-17 15:32 -------
> > 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% 
> of
> > the time
> 
> Could you write the code for the last part? I don't know what works well 
> enough.

I would suggest something like 

grep '^#define[[:space:]]*UTS_RELEASE' /usr/src/linux/include/linux/* | cut -d\
 -f3 | sed 's/"//g'

the UTS_RELEASE should only be defined once in those files and that should work
across versions of the kernel (at least for now).

this would be put in the 'if all else fails' clause.




-- 
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