Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > help with disktool

help with disktool
Thread Tools
Grizzled Veteran
Join Date: Sep 2000
Location: .au
Status: Offline
Reply With Quote
Aug 5, 2004, 11:46 AM
 
Hi there,

I'm trying to script disktool to unmount (not eject) an audio cd. The problem being, the names of audio cds always change thanks to iTunes getting the CDDB info (which I still need to happen), and the device number always changes because I've got a few external drives.

I was thinking that the best way to work out the device number would be by using mount to work out which drive was read only, then taking that and piping the number into disktool to unmount.

Only problem is, I have no idea how to do it

Any help much appreciated!

-- james
     
Junior Member
Join Date: Mar 2003
Location: Walnut Creek, CA
Status: Offline
Reply With Quote
Aug 6, 2004, 03:48 AM
 
something like this, perhaps:

Code:
#!/bin/sh # a shell script to unmount the read-only, non-disk image CD mount | grep read-only | grep -v "mounted by" | awk '{print$1}' | umount # mount gets the mounted drives, the second and third steps get the audio CD isolated # the awk gets the device, and passes it to umount.


EDIT: oops, forgot this was about disktool. Don't know a thing about that. Sorry... oh, and if you use this script, note that disk images don't take kindly to being unmounted this way, so be sure that you're actually using an Audio CD, and not a disk image of one.
(Last edited by GeeYouEye; Aug 6, 2004 at 03:55 AM. )
I bring order to chaos. You are in chaos windows, you are the contradiction, a bug wishing to be an OS.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:28 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2