Then which repository is  in  effect after rebooting? the  current one 
or the running one?
And, in my case, do I need to use svcadm refresh, or just change the 
current repository will be enough?

Regards,
Zhijun

Casper.Dik at Sun.COM wrote:
>> On 9/11/06, Fu Zhi-jun <Zhijun.Fu at sun.com> wrote:
>>     
>>> Hi,all,
>>>
>>> Recently I met a problem in using smf.
>>> I used "svccfg -s ${FMRI} setprop config/$SERVICE_ENABLED = true" to
>>> enable a service,and then used "svcprop -p config/$SERVICE_ENABLED
>>> $FMRI" to retrieve the value to judge whether the service is enabled. To
>>> my surprise, svcprop told me the service is 'disabled'.
>>> Later, I learned from others that svccfg operates on 'current' set, and
>>> svcprop retrieves value from 'running" snapshot, so I need to use
>>> "svcadm refresh $FMRI" to copy the value to running set, or use '-c' to
>>> let svcprop retrieve value from 'current' set.
>>>
>>> Then my question is, why we need the running snapshot? Isn't it easier
>>> to use only the current set other than syncing between the two sets?
>>>       
>> At least for scripting, it will be disruptive to the service if SMF
>> syncs for every in-transit svccfg invocations.
>>     
>
> There are several other reasons:
>
>       - the requirement of doing "svcadm refresh" after modifying 
>         properties allow you to reconfigure the services without worrying
>         about the system behaving strangely when only a part of the 
>         properties have been updated
>
>       - the "current" repository keep tracks of services coming on-line;
>         in general the on-disk repository does not need to be written 
>         when booting
>
>       - the "current" repository allows for temporary disabling of 
>         services (disable until next reboot)
>
>
> Casper
>
> _______________________________________________
> smf-discuss mailing list
> smf-discuss at opensolaris.org
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20060911/6ef7ae1e/attachment.html>

Reply via email to