19 Apr
2011
19 Apr
'11
7:39 p.m.
On 2011 Apr 18, at 12:32, Matt Calthrop wrote:
I want to run a shell script whenever a volume is mounted – and the shell script needs to somehow know what the name of the volume is that has just been mounted.
I know it can be done (HardwareGrowler does it), but I just haven't found out how yet.
Read: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPa... You will find: StartOnMount <boolean> This optional key causes the job to be started every time a filesystem is mounted. And if that doesn't work for some reason, maybe try and "watch" /Volumes using this: WatchPaths <array of strings> This optional key causes the job to be started if any one of the listed paths are modified.