|
|
10.5: Mount a partition or volume on demand
I'd like to add something: You don't need to determine the dev_id of the drive. Since you already know the UUID of the partition for the first part of the hint you can also use the UUID to mount the partition. Just use
where UUID is this weird long number assigned to the partition, which you can get, btw, by typing
10.5: Mount a partition or volume on demand
the main problem is that UUIDs only apply (so far as I can tell) to volumes formatted with HFS and HFS+. Windows-compatible volumes don't seem to have them, and I don't know about NFS or other formats (since I haven't made any to test). if you're only working with Apple file systems, then yes, UUIDs are certainly better and easier, but I don't think it generalizes.
10.5: Mount a partition or volume on demand
ah, wait, I see what you're saying: since you've already but the LABEL or UUID into the fstab file, then you might as well just put it directly into diskutil's mount command without searching for it, right? The reason I did it this way, though, is to handle cases where the script gets run while the disk isn't mounted: the dev_id variable will be the null string if the disk is not there, and so the script will fail gracefully. I don't know what will happen if you ask diskutil to mount a volume on a non-present drive; probably nothing, but... point taken.
10.5: Mount a partition or volume on demand
You are absolutely right, FAT and NTF volumes don't have a UUID. Didn't consider this. This will make the first part of the hint pretty hard with external volumes. Anyone know what to use in fstab instead of UUID?
10.5: Mount a partition or volume on demand
Oh, I'm sorry ... didn't read the first part right. Of course you use the LABEL of the drive ...
10.5: Mount a partition or volume on demand
There's a small typo, it should read: |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|