dvd_drive_status(1)

NAME
dvd_drive_status - display the status of a DVD optical tray

SYNOPSIS
dvd_drive_status [device]

DESCRIPTION
dvd_drive_status returns the state of an optical drive. Optical drives can have one of six states: open, opening, closed, closing, closed with or without a disc. When an optical drive is physically opening or closing, there is a "polling" state where it cannot be accessed. dvd_drive_status prints out the optical drive's state and returns a relevant exit code as well. Exit codes:
 1 - no disc (closed, no media)
 2 - tray open
 3 - drive not ready (opening or polling)
 4 - drive ready (closed, has media)
 5 - device exists, but is NOT a DVD drive
 6 - cannot access device
 7 - cannot find a device

OPTIONS

dvd_drive_status will take the device path as an argument, or use the system's default optical drive if none is given.

BUGS
Depending on your OS, optical drive, and disc, there's always a chance for race conditions.

SEE ALSO
dvd_info(1)

AUTHOR
Steve Dibb (steve.dibb@gmail.com) https://dvds.beandog.org