lkml.org 
[lkml]   [1998]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kmod/kerneld
On Thu, 12 Mar 1998, Bernhard Rosenkraenzer wrote:

> My solution was
>
> if test `uname -r` == "2.0.33"; then
> /sbin/kerneld
> fi

What about this, supposing you can run cut and expr:

#!/bin/bash

expr `echo \`uname -r\`|cut -f1 -d.` \* 65536 + \
`echo \`uname -r\`|cut -f2 -d.` \* 256 + \
`echo \`uname -r\`|cut -f3 -d.` \<\= 131418 1>/dev/null

if [ $? -eq 0 ]
then
echo load kerneld
fi

Of course you, too, could store the value of expr in a variable and use it
somewhere else :)

____/| Ragnar Hojland (tech.support@redestb.es) Fingerprint 94C4B
\ o.O| 2F0D27DE025BE2302C
=(_)= "Thou shalt not follow the NULL pointer for 104B78C56 B72F0822
U chaos and madness await thee at its end." hkp://keys.pgp.com



-
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.983 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site