Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Makosuke

macrumors 604
Original poster
Aug 15, 2001
6,835
1,580
The Cool Part of CA, USA
I can't decide whether this question most belongs here, in Server, or in Programming, but anyway:

One of the users I admin is trying to set up a shell script to scrape some data and save it to a specific location on a specific server volume. The issue I'm running into is that, for whatever reason, when a Mac "hiccups" with a mounted volume it shows up in /Volumes with a new name, which breaks all hard paths to it.

An example is this: I have a server drive with the volume name "SharedData". Normally, its path is "/Volumes/SharedData". However, at some point, it ended up being "/Volumes/SharedData 1", while a "phantom" "Volumes/SharedData" also exists. Data targeted at "/Volumes/SharedData" will now end up in the phantom directory instead of on the correct external disk.

I've seen this issue crop up occasionally on my home systems with flakey external mounts, but I'm now seeing it on a server (running Leopard Server) despite there not having been any mount issues I'm aware of.

Everything WORKS fine, except for scripts that use the hard path.

What should I be doing to reference this volume so it doesn't break if this happens again?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.