Re: auto mount not working
Re: auto mount not working
- Subject: Re: auto mount not working
- From: dealTek <email@hidden>
- Date: Mon, 14 Jan 2013 07:58:29 -0800
On Jan 14, 2013, at 12:03 AM, Axel Luttgens < email@hidden> wrote: Le 14 janv. 2013 à 00:33, dealTek a écrit :
newbie question...
I found this on the net but it does not seem to be working in ML 10.8.2
auto mount not working - I set a simple applescript - first I mount the drive = MyDisk (make sure it's working) - then unmount drive - then run simple script - but it does not mount
How can I fix this?
-----------
property diskname : "MyDisk"
do shell script "disktool -l | egrep -i \"Mountpoint = '', fsType = 'hfs', volName = '" & diskname & "\" | cut -d\\' -f2 | xargs -n1 disktool -m"
Use diskutil, perhaps? It has been some time now that we have been warned about the deprecation on disktool; it now seems to be official: the current man page for disktool(8) clearly states "do not use disktool", and the output of 'disktool -l' is the same as the one of 'diskutil list', with an additional line:
diskutil: please use diskutil(8) instead of disktool
BTW, are you really thinking about auto mounting, or just mounting a volume?
Axel
Hi Alex,
Thanks for the help... well I most likely just want to mount the drive (auto mount wrong term?)
I found this on the net and it seems to work fine now.......
set theDisk to "My drive" do shell script "diskutil mount `diskutil list | awk '/ " & theDisk & " / {print $NF}'`"
and this will unmount
set theDisk to "My drive" do shell script "diskutil unmount " & quoted form of ("/Volumes/" & theDisk)
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden