On Tue 24 May 2011 at 12:49PM, Tim Foster wrote:
> Hi there,
> 
> I've got a short webrev here for some nasty zones breakage that I'd
> appreciate a review of please:
> 
> http://cr.opensolaris.org/~timf/zones-fix-webrev
> 
> I've only occasionally seen the 'boot' brand script hit this problem,
> but sysboot hits it all the time (tested using a collection of 8 zones,
> all set to either autoboot, or not autoboot, respectively)
> 
> Comments welcome,
> 
>       cheers,
>                       tim

common.ksh:

- Please only create new upper-case variables if they are environment
  variables.
- Use typeset to declare variables in functions so that they don't
  create/clobber variables in the global scope.
- Do not use deprecated features of ksh, such as [ ]

        typeset sync=
        [[ $1 == async ]] && sync=-s

I guess I missed some other reviews where I should have spoken up too.
This is not related to this change, but in general, please declare
ksh functions as:

function dostuff {
}

Rather than

dostuff() {
}

This helps debugging of ksh93 greatly because line numbers referenced in
ksh error messages actually refer to the line numbers in scripts.  This
is critical for proper functioning of the backtrace function in
/usr/lib/brand/shared/common.ksh.

-- 
Mike Gerdts
Solaris Core OS / Zones
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to