query cdrw tray

Joan Picanyol lists-freebsd-hackers at biaix.org
Fri Dec 17 05:17:32 PST 2004


* Ed Stover <estover at nativenerds.com> [20041217 13:12]:
> Ok, this a good one for experts.
> 
> 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.

I'm no expert, but...

521,p1,1$ cdrecord -s dev=1,1,0 -atip > /dev/null | grep "No disk"
scsidev: '1,1,0'
scsibus: 1 target: 1 lun: 0
cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support code.
cdrecord: If you need DVD-R/DVD-RW support, ask the Author for cdrecord-ProDVD.
cdrecord: No disk / Wrong disk!

qvb
-- 
pica


More information about the freebsd-hackers mailing list