On Fri, Dec 17, 2004 at 12:11:52PM -0700, Ed Stover wrote:
> 
> How to I ask the CD burner if it's tray is open or closed? I am creating
> a automagical shell script to do semi-unattended backups and need to
> figure out how to make sure there is a cd in the tray before I start
> burning. Any help would be greatly appreciated.

Having solved this once before, here's the code I used:

   #!/bin/sh 

   # Spin wait for a CD into the drive
   while /usr/X11R6/bin/cda status | /usr/bin/grep -q '^No_Disc' 
   do
           sleep 1;
   done

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to