I  forgot to say that you might want to give this CR a read.  I don't 
use file dependency anymore, and I advocate people not to do it.

CR 6240573
Synopsis: File dependencies are currently overused by SMF consumers. The 
problem is that a file dependency means "wait for this file to become 
available before starting".  That's not the usual case.  Most users of 
file dependencies are trying to express the concept that "if this file 
is missing, there is a problem."

Also, from the SMF Q&A:

3.10    How come my service hasn't started even though the file: 
dependency is
         now fulfilled?

         There is no file event to signal SMF that a file has come online.
         If SMF tries to start your service and finds that a file: 
dependency
         is not satisfied, it continues to think so forever.  See CR 
5106165.

         The workaround is to run "svcadm refresh".  If the file is on a 
remote
         filesystem, make sure your manifest includes the appropriate 
filesystem
         dependency to allow your service to find the files it needs 
before it
         starts.

It's almost worse to have a file dependency instead of a short (if -f 
somefile).

CT

Reply via email to