"Craig Cory" writes:
> Thank you for this explanation as I was (also) under the impression that a
> manifest file change was a necessary, even desireable, step. Is there, then, 
> a
> "reconmmended" way to hold my customizations if not to edit the manifest
> directly? Would I be counting on svccfg/repository snapshots to revert to MY
> changes if altered?

I'm not sure what conditions your "if altered" comment refers to.  Maybe
an example would help?  I'll inflict some unsupported violence on 
sendmail.

I've got sendmail on my system, with a start method timeout of 120:

   $ svcprop -p start/timeout_seconds sendmail

That's specified in the /var/svc/manifest/network/smtp-sendmail.xml 
file.
                <exec_method
                        type='method'
                        name='start'
                        exec='/lib/svc/method/smtp-sendmail start'
                        timeout_seconds='120' />

I'll update the manifest and change the XML above to:
                <exec_method
                        type='method'
                        name='start'
                        exec='/lib/svc/method/smtp-sendmail start'
                        timeout_seconds='920' />
Note that you have to use w! (or your editor's equivalent), as we
ship the file 444 to discourage changes.

svccfg import the changed manifest and see that the property is updated.
It does that because the value of the timeout hasn't been modified
by an admin.  It's the same as the last time we imported the method.

   # svccfg import /var/svc/manifest/network/smtp-sendmail.xml
   # svcprop -p start/timeout_seconds sendmail                
   920

But I'm an admin and I need my customizations to stick.  Rather than 
tricking the system into thinking you're an update to the package (by 
modifying and re-importing a manifest), you use 'svccfg':

   # svccfg -s sendmail setprop start/timeout_seconds = 820
   # svcadm refresh sendmail
   # svcprop -p start/timeout_seconds sendmail   
   820

Cool.  Now I've customized it by not using the same manifest.  Now
if I apply a patch, it shouldn't change.  Let's simulate that by running
that import again.

   # svccfg import /var/svc/manifest/network/smtp-sendmail.xml
   # svcprop -p start/timeout_seconds sendmail                
   820

Note that the customization stuck, even when Sun delivers a new 
sendmail manifest.

(We're working on a project to make this better but are at the early 
phases.  We'll publish design docs in the SMF community when we're 
further along in requirements gathering.  Using svccfg will always work,
we'd just like to allow you to set these variables during jumpstart more
easily...)

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



Reply via email to