[NTLUG:Discuss] detect disk in cdrom
Greg Edwards
greg at nas-inet.com
Mon Jul 12 10:10:23 CDT 2004
Richard Geoffrion wrote:
>>----- Original Message -----
>>From: "joseph beasley" <joe_beasley at yahoo.com>
>>To: <discuss at ntlug.org>
>>Sent: Saturday, July 10, 2004 12:18 AM
>>Subject: [NTLUG:Discuss] detect disk in cdrom
>>
>>
>>
>>>Is there a way to detect a disk in a cdrom? I'm writing a script to
>>>backup to my CDRW each night, but I need the script to abort if I
>>>forget to put a cd in before I leave.
>>>
>>>The script is just a shell script using mkisofs and cdrecord.
>>>
>>
>
> What about doing a 'cdrecord -inq' # -inq do an inquiry for the drive and
> exit. does that return any usable info?
>
> --
> Richard
Mandrake has a tool called "supermount" that will probably have the code
in it to tell you what to do. It's part of the Mandrake distrib and is
Open Sourced.
--
Greg Edwards
Software Engineering Services - http://consult.nas-inet.com
Custom Hosted Websites - http://www.nas-inet.com
More information about the Discuss
mailing list