Re: Disabling auto-mounting of CDROM
Re: Disabling auto-mounting of CDROM
- Subject: Re: Disabling auto-mounting of CDROM
- From: Jason Stephenson <email@hidden>
- Date: Fri, 21 Nov 2008 08:51:36 -0500
Shayne Wissler wrote:
Hello,
I'm trying to get OSX to stop automounting the CDROM. This is important
for an application I'm writing that uses cdrecord--the automounting
conflicts with cdrecord, and I don't need automounting.
I work around this in a script that I wrote to run from the command line
that uses cdrecord. The script checks for a mounted CDROM and unmounts
it if necessary. The relevant bit is pasted below:
mounted=$(mount | grep -E '/Volumes/[[:digit:]]{8}_[[:digit:]]{6}'
| cut -f3 -d\ )
if [[ "${mounted}" != "" ]] ; then
diskutil unmountDisk ${mounted}
fi
Granted that looks for a disc with a name identical to how my script
formats the name of the ISO image, so it is a bit fragile in that respect.
If you're already using NSTask or system() to run cdrecord, you could
also use it to run diskutil to unmount the disc.
Also, is there some reason that you are using cdrecord instead of Disc
Recording framework or hdiutil? I am considering changing my script to
use the Apple-provided tools instead of cdrecord/mkisofs.
The first thing I tried was removing disk arbitration:
http://www.forensicswiki.org/wiki/Disabling_Macintosh_Disk_Arbitration_Daemon
That caused repeated crashing of metadata.mds, and eventual kernel
panic. So I disabled that daemon. The messages went away but my system
still panics after 10min or so.
Any suggestions would be appreciated.
Thanks,
Shayne Wissler
------------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden