Matthew Schalit wrote:
> 
> David Douthitt wrote:
> >
> > Matthew Schalit wrote:

> > I wonder if it could be a problem in splitting of arguments?
> > Perhaps....
> 
> I have a feeling that it's either a parsing/IFS issue, or
> more likely it's some hard coded issue with the
> ${foo:+bar} format.

It looks like this:

ifconfig eth0 $IP ${MASK:+netmask $MASK}

...would get parsed as:

"ifconfig" "eth0" "10.0.0.4" "netmask 255.0.0.0"

...which provides a nice litte error about not finding a host named
"netmask 255.0.0.0" (cute!).  Notice the space is not "split" apart by
the shell.

However, if we change to:

ifconfig eth0 $IP ${MASK:+netmask} $MASK

...it becomes...

"ifconfig" "eth0" "10.0.0.4" "netmask" "255.0.0.0"

...which works correctly.  If MASK is unset, then it becomes (I
think)...

"ifconfig" "eth0" "10.0.0.4"

...and also works correctly...  Even if it is:

"ifconfig" "eth0" "10.0.0.4" "" ""

...it works correctly anyway...

It would be interesting to hear the specific details.

The new March 2001 release uses the WORKING format, as you described it.

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

Reply via email to