Chris Pickett wrote:
> On 5/3/07, Roland Mainz <[EMAIL PROTECTED]> wrote:
> > Chris Pickett wrote:
[snip]
> > 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 ]


Ahhggllrrrrll.... ;-(
Welcome to the "set"/"unset" "fun" in the Bourne shell (another variant
of this issue was
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6540124
("RFE: OS/Net build could be slightly more portable").

> The sh manual page is ambiguous which return code is expected for
> 'set'. Is there any other documentation for sh?

POSIX requires that the "set" builtin returns |0|, see
http://www.opengroup.org/onlinepubs/009695399/utilities/set.html (well,
the Bourne shell in Solaris predates even the first POSIX shell standard
drafts (which means it can do anything it wants in this case... ;-( )).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to