5

OS X, 10.8.x

We're using a launchd plist file (in /Library/LaunchDaemons) to start a server application whenever the machine is started. If the application to start is not on the system volume, rather than on another internal volume, that disk is not always mounted in time, and the job is respawned every 10 secs.

Is there any way to wait for that file system object to become available? (maybe ?)

Thanks, Akos

Ákos
  • 3,221
  • 2
  • 12
  • 9

1 Answers1

4

Yes. You can use KeepAlive with PathState key. Pass volume path (/Volumes/mavericks) in PathState.

PathState : Each key in this dictionary is a file-system path. If the value of the key is true, then the job will be kept alive as long as the path exists. If false, the job will be kept alive in the inverse condition. The intent of this feature is that two or more jobs may create semaphores in the file-system namespace.

Parag Bafna
  • 22,812
  • 8
  • 71
  • 144