lkml.org 
[lkml]   [1998]   [Mar]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 13 Mar 1998 14:53:49 +0100 (MET)
FromMichiel Boland <>
SubjectRe: kmod/kerneld
On 13 Mar 1998, Andreas Schwab wrote:

[about detecting kernel versions in shell scripts]

> if let "$1 * 65536 + $2 * 256 + $3 <= 0x2015a"
> then
>   echo load kerneld
> fi 

If I'm not mistaken, 'let' is a bash-ism. The following
construction IMHO is more portable & more readable.

case `uname -r` in
2.0.*|2.1.?|2.1.[1-8]?)
	echo load kerneld
	;;
esac
This is getting slightly off-kernel, so no follow-ups to the list
please. :) 

Cheers
Michiel


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2008