On 5/3/07, Roland Mainz <roland.mainz at nrubsig.org> wrote:
> Chris Pickett wrote:
> [CC:'ing networking-discuss at opensolaris.org as some of the traffic went
> there...]
> > On 4/30/07, James Carlson <james.d.carlson at sun.com> wrote:
> > > Alan Coopersmith writes:
> > > > A while ago we switched /sbin/sh from Bourne to the new Korn shell
> > > > for our
> > > > OpenSolaris distribution and everything except network routing setup
> > > > works. A
> > > > closer look revealed that /lib/svc/method/net-routing-setup does not
> > > > work
> > > > without any error reported to the log file and a later network service
> > > > restart
> > > > brings the routing online again
> > >
> > > It's already been downgraded to a P3 RFE, as we've never made any
> > > promise that the script would work with ksh93.
> > >
> > > It's not clear, at least to me, and with the information given,
> > > whether this is indeed a problem in net-routing-setup, or if it's a
> > > problem in ksh93's compatibility with /sbin/sh.
> >
> > I submitted the report. I think the culprit is the the coding style in
> > the script which invites all sorts of problems, for example variables
> > are not quoted which leads to problems if the variable content
> > contains blanks, newline or other characters (*.?"'!\;:{})($%&) which
> > have a special meaning for the shell.
>
> AFAIK it's more likely that you build ksh93 the normal way and not with
> the adjusted builtin table which changes the builtin command bindings to
> match PSARC 2006/550. If the list of default builtins is not adjusted
> you may get a couple of weired effects (the same issue+bug in "uname"
> builtin hit Blastwave's "pkg-get" badly) ...
I ran a diff over the log files, it looks that the 'set' builtin
behaves differently (old log is Bourne shell, new log is ksh93):
+ /usr/sbin/route -n add default -gateway 192.168.0.1
+ set -- add net default: gateway 192.168.0.1: entry exists
-+ [ 17 -ne 0 -a x192.168.0.1: = x192.168.0.1: ]
-do_delete=no
-+ [ -n 192.168.0.1 -a no = yes ]
-+ [ != true ]
++ [ 0 -ne 0 -a x192.168.0.1: = x192.168.0.1: ]
++ [ -n 192.168.0.1 -a yes = yes ]
++ /usr/sbin/route -n delete default -gateway 192.168.0.1
++ 1> /dev/null
++ [ '' != true ]
+ [ -z 192.168.0.1 ]
The sh manual page is ambiguous which return code is expected for
'set'. Is there any other documentation for sh?
Chris
--
^---^
(@)v(@) Chris Pickett
| / IT consultant
===m==m=== pkchris at users.sourceforge.net