Roland Mainz wrote:
> James Carlson wrote:
> > Chris Pickett writes:
[snip]
> Erm... that is AFAIK wrong.
> The Bourne shell returns a non-zero value (|17|) in Chris's example
> above while ksh93 (note the quotes ("''") around empty variables - only
> ksh93 does that for xtrace) returns |0| as required by POSIX (see
> http://www.opengroup.org/onlinepubs/009695399/utilities/set.html).
>
> I can reproduce the problem on my side (after some fighting with
> VMware), patch follows in a few mins...
Attached is a prototype patch
("lib_svc_method_routing_setup_posix001.diff.txt") which fixes the
problem...
Does anyone volunteer to sponsor the patch (in a version which uses more
descriptive variable names) ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [EMAIL PROTECTED]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)--- /lib/svc/method/net-routing-setup.orig Thu May 3 18:59:52 2007
+++ /lib/svc/method/net-routing-setup Thu May 3 18:59:52 2007
@@ -136,9 +136,11 @@
#
do_delete=yes
for router in $defrouters; do
- set -- `/usr/sbin/route -n add default \
+ x=`/usr/sbin/route -n add default \
-gateway $router`
- [ $? -ne 0 -a "x$5" = "x$route_IP:" ] \
+ res=$?
+ set -- $x
+ [ ${res} -ne 0 -a "x$5" = "x$route_IP:" ] \
&& do_delete=no
done
_______________________________________________
networking-discuss mailing list
[email protected]