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. -- Just me, Wire ...