A couple of comments on the notes below... On 03/17/10 03:58 PM, Antonello Cruz wrote: > Please find my feedback for usr/src/cmd/svc/milestone/manifest-import > below. > > usr/src/cmd/svc/milestone/manifest-import > 61: if you are looking for the prorpety manifestfile, why not > simplify by doing > > smfmfiles=`/usr/bin/svcprop smf/manifest | \ > awk '/\/manifestfile / {print $3}' | grep '^/lib'` > > You could probably make awk match the '^/lib' in the same > command, but you'd have to ask barts how to do it ;-) > > Additionally, why are you using egrep at the end of the pipe in > the original code? > > 64: we can use a similar simplification as above > 64: we can use a similar simplification as above
Not sure I remember why we used egrep there... but can definitely make the change to the awk to get the manifestfile keyword. As I look at this what about a case where a manifest file is named something like foo_manifestfile.xml could that trip this up? Need to investigate this and harden this code section a bit. > 68: what are we expecting to be in nw? aren't we redirecting > everything to /dev/null ? > We are redirecting stderr to 1, then redirection stdout to /dev/null, so we only capture the error output in nw as expected. > > funciton preserve_system_profiles: > since you don't remove all manifest hashes (line 305 old file) > won't all the > > /usr/sbin/svccfg -s smf/manifest addpg ${profile} framework > > generate log noise? I.e. > > 'svccfg: Property group already exists.' > > for each profile kept? > > Antonello > <snip> -- Sean Wilcox 303.272.9711 x79711