bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yet Another test option


From: Bob Proulx
Subject: Re: Yet Another test option
Date: Sun, 3 Jul 2011 14:41:49 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Bruce Korb wrote:
> I wouldn't know.  I use it myself a bit and I am now playing with
> Lustre fs code where they get it wrong because it is inconvenient to
> get it right.  After seeing that, I thought I'd suggest it.
> ...
> P.S. this check is really for any version below 2.6.27:
> 
> -     case $LINUXRELEASE in
> -     # ext4 was in 2.6.22-2.6.26 but not stable enough to use
> -     2.6.2[0-9]*) enable_ext4='no' ;;
> -     *)  ..... ;;
> 
> and might have been done correctly with a version compare operator.

Note that on Debian systems and derivatives you can use dpkg with the
--compare-versions option to perform this test.

  $ set -x
  $ dpkg --compare-versions 2.6.27 le $(uname -r) ; echo $?
  ++ uname -r
  + dpkg --compare-versions 2.6.27 le 2.6.39-2-amd64
  + echo 0
  0

  dpkg --compare-versions 2.6.27 le $(uname -r) || enable_ext4='no'

I seem to recall a similar command on Red Hat based systems but off
the top of my head the details escape me.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]