Re: Mac OSX Leopard and server connections
On Feb 5, 2010, at 2:19 PM, Dan Soneson wrote: Hi everyone, I have a rather odd problem using rev applications on Mac OSX Leopard, connecting to a server on my network. I connect to a server with an Applescript command: do theScript as Applescript. I can do this just fine. But if I unmount the server by dragging it's icon to the trash, then remount from within Rev eventually Rev reads the name of the server differently. Let's say the name of the server is George. I can connect to George several times, but eventually Rev or Leopard appends a digit to the name of the mounted volume. Originally, the path to file Textfile.txt on the server named George will be /Volumes/George/Textfile.txt However, after a few connections (don't know how many or exactly when this happens), the path to the file becomes /Volumes/George-1/Textfile.txt. Oddly enough, the icon on the desktop for the volume is still George. However, any reference to the file Textfile.txt from within Rev now will fail, since Rev reads the connection as /Volumes/George-1/ Textfile.txt but is still looking for /Volumes/George/ Textfile.txt! This gets somewhat frustrating, since I never know when it will happen, and once it does, I can no longer transfer files back and forth between the server and the computer. Has anyone seen this behavior? Do you have a workaround or a suggestion to get around this problem? I never had the problem working with pre-Leopard operating systems on the Mac, but it is now cropping up since all our computers in a lab are now running Leopard. Another issue may be that the physical server (now running OSX Snow Leopard) has several share points, each of which may be mounted as individual volumes, one of which is the aforementioned George. Mounting and unmounting several of these share points may bring about the re-numbering issue. Rebooting the individual computer doesn't seem to help either. Thanks for any suggestions. Dan, Maybe not a complete answer, but a clue: When OS X mounts volumes with the same name the way it keeps them separate in the Volumes list is by appending a number to the duplicate name. I have sometimes seen cases where the OS somehow doesn't get the message that a volume was ejected, and if it is remounted the volume name appears with a number appended. Open the terminal and type 'ls /Volumes' to see a list of all mounted volumes. Maybe what you need to do is check for the existence of the volume before you try to mount it? Regards, Devin Devin Asay Humanities Technology and Research Support Center Brigham Young University ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Mac OSX Leopard and server connections
2010/2/5 Dan Soneson soneso...@southernct.edu: Hi everyone, I have a rather odd problem using rev applications on Mac OSX Leopard, connecting to a server on my network. I connect to a server with an Applescript command: do theScript as Applescript. I can do this just fine. But if I unmount the server by dragging it's icon to the trash, then remount from within Rev eventually Rev reads the name of the server differently. Let's say the name of the server is George. I can connect to George several times, but eventually Rev or Leopard appends a digit to the name of the mounted volume. Originally, the path to file Textfile.txt on the server named George will be /Volumes/George/Textfile.txt However, after a few connections (don't know how many or exactly when this happens), the path to the file becomes /Volumes/George-1/Textfile.txt. Oddly enough, the icon on the desktop for the volume is still George. However, any reference to the file Textfile.txt from within Rev now will fail, since Rev reads the connection as /Volumes/George-1/Textfile.txt but is still looking for /Volumes/George/Textfile.txt! This gets somewhat frustrating, since I never know when it will happen, and once it does, I can no longer transfer files back and forth between the server and the computer. Has anyone seen this behavior? Do you have a workaround or a suggestion to get around this problem? I never had the problem working with pre-Leopard operating systems on the Mac, but it is now cropping up since all our computers in a lab are now running Leopard. Another issue may be that the physical server (now running OSX Snow Leopard) has several share points, each of which may be mounted as individual volumes, one of which is the aforementioned George. Mounting and unmounting several of these share points may bring about the re-numbering issue. Rebooting the individual computer doesn't seem to help either. Thanks for any suggestions. Hi Dan, To resolve your problem you could use a try statement like this: set myVolume to /Volumes/George try do shell script ls myVolume -- check if the volume /Volumes/George exists. If the volume doesn't exists an error occurs set myVolume to myVolume on error set myVolume to myVolume -1 -- if the try statement failed then the volume must be /Volumes/George-1 end try set myDocument to myVolume Textfile.txt If you want a list of all volumes mounted and try something different, you can use : paragraphs of (do shell script /bin/ls /Volumes) HTH -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Mac OSX Leopard and server connections
2010/2/6 zryip theSlug zryip.thes...@gmail.com: Hi Dan, To resolve your problem you could use a try statement like this: set myVolume to /Volumes/George try do shell script ls myVolume -- check if the volume /Volumes/George exists. If the volume doesn't exists an error occurs set myVolume to myVolume on error set myVolume to myVolume -1 -- if the try statement failed then the volume must be /Volumes/George-1 end try set myDocument to myVolume Textfile.txt I correct myself to remove an useless line : set myVolume to /Volumes/George try do shell script ls myVolume -- check if the volume /Volumes/George exists. If the volume doesn't exists an error occurs -- set myVolume to myVolume -- useless here ;) on error set myVolume to myVolume -1 -- if the try statement failed then the volume must be /Volumes/George-1 end try set myDocument to myVolume Textfile.txt Regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Mac OSX Leopard and server connections
Dan, I had the same with the volume name appended with -x when fast user switching was on and multiple connections to the server were established by different users. Internally the server name appended by -1, -2 and so on. This is under MacOS 10.5.x, but I seem to recall it was also for 10.4.x. regards Bernd -- View this message in context: http://n4.nabble.com/Mac-OSX-Leopard-and-server-connections-tp1470797p1470939.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Mac OSX Leopard and server connections
I have a rather odd problem using rev applications on Mac OSX Leopard, connecting to a server on my network. I connect to a server with an Applescript command: do theScript as Applescript. I can do this just fine. But if I unmount the server by dragging it's icon to the trash, then remount from within Rev eventually Rev reads the name of the server differently. Let's say the name of the server is George. I can connect to George several times, but eventually Rev or Leopard appends a digit to the name of the mounted volume. Originally, the path to file Textfile.txt on the server named George will be /Volumes/George/Textfile.txt However, after a few connections (don't know how many or exactly when this happens), the path to the file becomes /Volumes/George-1/Textfile.txt. Oddly enough, the icon on the desktop for the volume is still George. However, any reference to the file Textfile.txt from within Rev now will fail, since Rev reads the connection as /Volumes/George-1/Textfile.txt but is still looking for /Volumes/George/Textfile.txt! This gets somewhat frustrating, since I never know when it will happen, and once it does, I can no longer transfer files back and forth between the server and the computer. Has anyone seen this behavior? Do you have a workaround or a suggestion to get around this problem? I never had the problem working with pre-Leopard operating systems on the Mac, but it is now cropping up since all our computers in a lab are now running Leopard. Another issue may be that the physical server (now running OSX Snow Leopard) has several share points, each of which may be mounted as individual volumes, one of which is the aforementioned George. Mounting and unmounting several of these share points may bring about the re-numbering issue. Rebooting the individual computer doesn't seem to help either. This isn't just a Snow Leopard problem but has been around for a long time. Here is the script I use for making network connections. The example connects to a Public folder on a remote machine. It includes a check for the shared folder not having been properly disconnected, so avoids the -1 problem. local sLastLoginAttempt -- connect to remote server -- on doRemoteLogin -- retrieve these 3 parameters from custom props or other data storage put the cRemoteIP of this stack into remoteIP put the cLoginName of this stack into login put base64decode(the cLoginPass of this stack) into pword put /Volumes/ login /Public/ into tRemoteFolder if the volumes contains login or there is a folder tRemoteFolder then exit doRemoteLogin -- already logged in end if if remoteIP is empty OR remoteIP = localhost OR remoteIP = 127.0.0.1 then exit doRemoteLogin -- getting data locally end if if login is empty OR pword is empty then exit doRemoteLogin -- not set up yet end if -- don't try more than once every 10 minutes, or it can lock up the program if the seconds - sLastLoginAttempt 600 then exit doRemoteLogin else put the seconds into sLastLoginAttempt end if -- Shell commands: -- mkdir /Volumes/emonitor -- mount_afp afp://emonitor:jad...@192.168.0.101/emonitor /Volumes/emonitor -- for a background task: command file_path 21 or command /dev/null 21 set the cursor to watch if there is a folder (/Volumes/ login) then -- was connected but didn't disconnect properly put rm -d /Volumes/ login into tShellCmd get shell(tShellCmd) end if put mkdir /Volumes/ login into tShellCmd get shell(tShellCmd) put mount_afp afp:// login : pword @ into tShellCmd put remoteIP / login /Volumes/ login after tShellCmd put /dev/null 21 after tShellCmd get shell(tShellCmd) -- keep checking for 10 seconds, then give up repeat 10 times set the cursor to busy wait 1 second with messages if the volumes contains login or there is a folder tRemoteFolder then exit doRemoteLogin end if end repeat end doRemoteLogin HTH, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Mac OSX Leopard and server connections
Dan, We have found this problem on OS X going back to Panther, 10.3.9. In our experience it happens when attempting to mount two volumes (or share points) with the same name. OS X will label the second one The Same Name-1 but the -1 is hidden. This can happen when a volume is remounted before it is completely dismounted. It can happen when inserting a flash drive (or any other type of drive) with the same name as one already mounted. Jeanne DeVoto mentioned that she noticed it when reinserting ejectable cartridges too rapidly. The esteemed Phil Davis has written us a program called Connection Repair which fixes this for the network-connected volume we use; it unmounts all volumes with that name. If there is a sufficient need for this we could generalize it and make it available to all Rev users. Paul Looney On Feb 5, 2010, at 8:57 PM, Sarah Reichelt wrote: I have a rather odd problem using rev applications on Mac OSX Leopard, connecting to a server on my network. I connect to a server with an Applescript command: do theScript as Applescript. I can do this just fine. But if I unmount the server by dragging it's icon to the trash, then remount from within Rev eventually Rev reads the name of the server differently. Let's say the name of the server is George. I can connect to George several times, but eventually Rev or Leopard appends a digit to the name of the mounted volume. Originally, the path to file Textfile.txt on the server named George will be /Volumes/George/Textfile.txt However, after a few connections (don't know how many or exactly when this happens), the path to the file becomes /Volumes/George-1/ Textfile.txt. Oddly enough, the icon on the desktop for the volume is still George. However, any reference to the file Textfile.txt from within Rev now will fail, since Rev reads the connection as /Volumes/George-1/Textfile.txt but is still looking for /Volumes/George/Textfile.txt! This gets somewhat frustrating, since I never know when it will happen, and once it does, I can no longer transfer files back and forth between the server and the computer. Has anyone seen this behavior? Do you have a workaround or a suggestion to get around this problem? I never had the problem working with pre-Leopard operating systems on the Mac, but it is now cropping up since all our computers in a lab are now running Leopard. Another issue may be that the physical server (now running OSX Snow Leopard) has several share points, each of which may be mounted as individual volumes, one of which is the aforementioned George. Mounting and unmounting several of these share points may bring about the re-numbering issue. Rebooting the individual computer doesn't seem to help either. This isn't just a Snow Leopard problem but has been around for a long time. Here is the script I use for making network connections. The example connects to a Public folder on a remote machine. It includes a check for the shared folder not having been properly disconnected, so avoids the -1 problem. local sLastLoginAttempt -- connect to remote server -- on doRemoteLogin -- retrieve these 3 parameters from custom props or other data storage put the cRemoteIP of this stack into remoteIP put the cLoginName of this stack into login put base64decode(the cLoginPass of this stack) into pword put /Volumes/ login /Public/ into tRemoteFolder if the volumes contains login or there is a folder tRemoteFolder then exit doRemoteLogin -- already logged in end if if remoteIP is empty OR remoteIP = localhost OR remoteIP = 127.0.0.1 then exit doRemoteLogin -- getting data locally end if if login is empty OR pword is empty then exit doRemoteLogin -- not set up yet end if -- don't try more than once every 10 minutes, or it can lock up the program if the seconds - sLastLoginAttempt 600 then exit doRemoteLogin else put the seconds into sLastLoginAttempt end if -- Shell commands: -- mkdir /Volumes/emonitor -- mount_afp afp://emonitor:jad...@192.168.0.101/emonitor / Volumes/emonitor -- for a background task: command file_path 21 or command /dev/null 21 set the cursor to watch if there is a folder (/Volumes/ login) then -- was connected but didn't disconnect properly put rm -d /Volumes/ login into tShellCmd get shell(tShellCmd) end if put mkdir /Volumes/ login into tShellCmd get shell(tShellCmd) put mount_afp afp:// login : pword @ into tShellCmd put remoteIP / login /Volumes/ login after tShellCmd put /dev/null 21 after tShellCmd get shell(tShellCmd) -- keep checking for 10 seconds, then give up repeat 10 times set the cursor to busy wait 1 second with messages if the volumes contains login or there is a folder tRemoteFolder then