lkml.org 
[lkml]   [1998]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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    [W:0.058 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site