• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mounting and Dismounting local or server volumes on Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mounting and Dismounting local or server volumes on Tiger


  • Subject: Re: Mounting and Dismounting local or server volumes on Tiger
  • From: Jacques Ravanat <email@hidden>
  • Date: Wed, 19 Oct 2005 00:45:20 +0200

Thanks Mark, for your answer, but you did not bring me the solution :

To further clarify the situation, my configuration is :

PowerMac G4 733 MHz named "G4733" or "G4733.local" with 3 physical disks, 2 of them with several partitions : 

"G4733-X", "G4733-W" (startup disk) and "G4733-9" on disk #1 (SCSI)
"G4733-ATA1" thru "GA733-ATA6" on disk #2 (ATA) 6 partitions
"G4733-Q2" with only one partition (SCSI)

Powerbook G3 400 MHz named "PB-G3400" or "PB-G3400.local" with a single disk "G3400-X" in one partition.

Ethernet link between the 2 computers thru a 100Mbps switch.
Both computer under Mac OS X 10.4.2
All commands issued from the PowerMac G4, 
"G4733-W" is the startup disk.


tell application "Finder"
    if not (exists disk "G3400-X") then
        mount volume "afp://PB-G3400.local/G3400-X/" as user name "Jacques" with password "abcdefg"  -- THIS WORKS  : the G3400-X icon appears on the desktop
    delay 3
    eject disk "G3400-X" -- THIS WORKS : the G3400-X icon disappears from the desktop
end tell

But it does not work with the others disks of the G4


What are you trying to do with the above? 

All the G4 disks are automatically mounted at startup, but can be dismounted (with Disk Utility for example)
I was trying unsuccessfully, to guess the correct syntax (or reference) to mount a dismounted  disk ("G4733-ATA5") 

Those commands make no sense;

OK, there syntax is not correct, but I had exhausted all the possibilities I could thing of !...

it looks like you're trying to mount an already-mounted volume,

No I was not !...

and you're referring to it in a way that won't work whether it's mounted or not.

OK, but WHAT WOULD YOU WRITE to mount and then dismount "G4733-ATA5" or "G4733-9" or "G4733-Q2" ?


If the disk is already mounted, then you don't want to "mount" it.  In the usual UNIX terminology, you want to "unmount" it (why we use that when the usual English opposite for "mount" is "dismount" is anyone's guess), and the UNIX command to do it is "umount" (guess the first "n" made it too long to type).  However, there is no "unmount volume" in AppleScript; the corresponding idiom from the Mac side of the house is "eject"ing, by analogy with floppies and CDs.

Sorry, but I already knew all that ...

If you're talking about hard disk partitions, using the UNIX commands mount and umount via "do shell script" is probably the *easiest* way to script things;

I agree with you, but I would like to know the proper  way to do it without UNIX if and when it is possible.

I'm not prepared to claim that it's the only way.  
But if you're talking about re-mounting a local filesystem via loopback NFS or local AFP or something like that, there's no reason you can't use "mount volume" and "eject disk".  

This is what I have tried without any success ...

But the argument to "mount volume" has to be the fully-qualified URL, even for local shares (e.g. afp://localhost/VolumeName),

mount volume "afp://G4733.local/G4733-ATA5/"  -- -- DOES NOT WORK, Connection failure. This server is operating on your computer. Please access volumes and files locally 

What should be written ?

and the argument for "eject disk" has to be whatever name shows up in the output of the "list disks" command.

list disks gives :  {"G4733-W", "G4733-Q2", "G4733-ATA1", "G4733-X", "G4733-ATA2", "G4733-9",  "G4733-ATA3", "G4733-ATA4", "G4733-ATA5", "G4733-ATA6","eDrive", "Network", "G3400-X"} when all the disks are mounted


tell application "Finder"
    eject disk "G4733-ATA5" -- DOES NOT WORK, nothing happens, no message, the G4733-ATA5 icon remains on the desktop
end tell

What should be written ?


Jacques Ravanat
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Mounting and Dismounting local or server volumes on Tiger (From: Jacques Ravanat <email@hidden>)
 >Re: Mounting and Dismounting local or server volumes on Tiger (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Getting a handler to use a value from a different handler?
  • Next by Date: Re: Getting a handler to use a value from a different handler?
  • Previous by thread: Re: Mounting and Dismounting local or server volumes on Tiger
  • Next by thread: Re: Mounting and Dismounting local or server volumes on Tiger
  • Index(es):
    • Date
    • Thread