[ale] BASH script - wait for CD insert

Christopher Bergeron christopher at bergeron.com
Wed Feb 16 21:48:39 EST 2005


Is it a dedicated DVD drive?  If so, why not just perform the first 
backup by manually loading the drive, and then when you get the DVD you 
just put another blank one in it's place?  Use cron to send email 
reminders to remind you to take the new backup out, and put the blank 
one in.

Just my .02 pfenning.
-CB





Michael Hirsch wrote:

>On Wed, 16 Feb 2005 02:14:09 +0000, Jay Loden <jloden at toughguy.net> wrote:
>  
>
>>I am scripting a DVD backup solution, and the idea is for the script to email
>>the admin when it is ready for the backup, then the admin puts in the DVD and
>>the backup is performed.  Does anyone know of a way to eject the CD tray,
>>wait for the DVD insert and then when it's inserted, continue on with the
>>script (burn the backup)?
>>
>>I know how to eject the tray, but not how to wait for and detect insertion of
>>the DVD.
>>    
>>
>
>I don't know of a scripty way to do it, but the CDROM ioctls let you
>query for the presence of a CD in the drive.  So you can poll for an
>inserted disk.  I've done this in C.  Not all drives correctly support
>it, however.  Ot at least, they didn't 4-5 years ago when I last did
>this.
>
>Michael
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>
>  
>



More information about the Ale mailing list