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

Re: swap not enabled if raid devices not in sync when booting



In article <20010126162510.L5539@cistron.nl>,
Wichert Akkerman  <wichert@valinux.com> wrote:
>Previously Russell Coker wrote:
>> The new version in 2.4.0 is supposed to fix this.  Maybe a check of
>> the `uname -r | cut -c1-3` to see if it's "2.2" would be useful to
>> determine if this is necessary.
>
>Please use /sbin/kernelversion instead.

Why call a 23 line external script when you can do it properly
in 1 or 2 lines of shell script:

ver=`uname -r`
echo ${ver%.${ver#*.*.}}

Yes, that is Posix. Ash groks it.

Or perhaps: if dpkg --compare-versions `uname -r` lt 2.4.0 ....

Bet nobody thought about that last one ;)

Mike.



Reply to: