Stacey Marshall writes:
> Following on from my "how to upgrade" question, http://www.opensolaris.org/ji
> ve/thread.jspa?threadID=21522&tstart=0, how would one achieve this in a patch
> ?
> 
> Unlike upgrades it is meant to be possible to back out a patch. Thus the patc
> h would need to save the current SMF state for the service so that it could b
> e restored....  And I'm not sure if its possible when backing out a patch to 
> execute scripts to accomplish that either.

It is possible to execute a script during the backout, as well as to 
stash state into a file.  I don't have the details of how to construct 
those two things, but the internal patch people should be able to help
on the vagaries of patch creation.

A really simple option is to explicitly dump the appropriate output from
svcprop into a file suitable for svccfg -f use, then execute
at the appropriate time.  It'd look pretty similar to your existing 
implementation, I think.

I don't know the rules for what happens if someone adds a patch
which changes config, then changes the config, then backs out the 
patch.  If it's OK to revert to the old config, then the above option 
will work.  Otherwise, you'd need to do a transform of current data 
back to the old format.

liane
-- 
Liane Praza, Solaris Kernel Development
liane.praza at sun.com - http://blogs.sun.com/lianep



Reply via email to