Jack Schwartz wrote: > On 11/14/08 15:22, Karen Tung wrote: > > Jack Schwartz wrote: > >> Wow! How cool is that? Thanks, Dave! > >> > >> I've basically taken this, and indented the code between the > >> single-quotes. > >> > >> I tested doing a build, and also verified via a test script that the > >> Hard Disk entry (entries) get removed wherever they are in the menu. > >> > >> Webrev updated at the same location: > >> > >> http://cr.opensolaris.org/~schwartz/081112.1/webrev/ > >> > >> On the caiman-discuss IRC channel, Dave has already approved this > >> change, so I need only one more reviewer. > > > > > > I think we should check the return value of nawk. What if it fails, > > we don't want to > > just overwrite the file. Everything else is fine. > > OK. I've revised the webrev. Now, if nawk fails, it prints a warning > but continues with the original Hard Disk entry left in. I didn't think > a nawk error here was worthy of trashing the whole usb image. > > Webrev is in the same place. > > I've tested error case (simulated by a bad file passed to nawk), a good > case, and a case where there was no Hard Disk entry in menu.lst.
One thing which directly jumps into my eye: -- snip -- if [[ $? == 0 ]] ; then -- snip -- ... please change this to: -- snip -- if (( $? == 0 )) ; then -- snip -- The differene is that [[ ]] compares strings while (( )) is an arithemtric expression and avoids an extra integer--->string conversion pass (the variable "?" is an integer by default). Beyond that it would be nice to make sure the new changes do not generate more hits in the output of $ ksh93 -n <scriptname> # ... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)
