On 1/23/02 at 9:31 AM, Charles Steinkuehler <[EMAIL PROTECTED]>
wrote:

> At the expense of readability, this can probalby be done
> with simple ash string manipulation, if the only thing
> sed's used for is extracting parameters from the kernel
> command line...
> 
> CMDLINE=`cat /proc/cmdline`
> 
> BOOT=${CMDLINE#*boot=}
> 
> if [ "$BOOT" != "$CMDLINE" ] ; then
>     BOOT=${BOOT%% *}
> else
>     BOOT=""
> fi

How about:

[ "$BOOT" != "$CMDLINE" ] && BOOT={BOOT%% *} || BOOT=

instead of the if...else...fi ?

However, I created a loop that reads ALL kernel command line
parameters and makes them into variables - settings with no "=" are
set with a '1', otherwise the "=XXXX" data (after the =) is stored in
the variable.

This done for ANY kernel command line parameter that might come along,
no matter what it is...
--
David Douthitt
UNIX Systems Administrator
HP-UX, Unixware, Linux
[EMAIL PROTECTED]

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to