Re: shell problems with %pre

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

 



On Mon, 24 Feb 2003, Philip Rowlands wrote:

> I'd guess bash, but that's just a guess. "env > /tmp/shellclues" should
> give you enough to work it out.

I don't think it's bash. Those evaluations work just fine after a 7.3
system is installaed and running. I assume it's a smaller, more basic
shell. No matter, I suppose.

> You could rewrite your script as:
>
> numdisks=`grep -cw 'sd$' /proc/devices`

That doesn't work either because the grep provided by BusyBox doesn't
support the -c flag. Turns out querying /proc/devices was a bad idea too.

So I ended up with:

NUMDISKS=`grep " sd[a-z] " /proc/partitions | wc -l | sed -e 's/.* //'`

--
Derek Vadala, derek@xxxxxxxxxxxx, http://www.cynicism.com/~derek





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux