Further again to my #10 comment:
My apologies, the shell script '/usr/local/bin/sr0_change.sh' above posted only works for dvd media.
The following should (?) work for other media (eg. audio CDs) as well:
#!/bin/sh dvd+rw-mediainfo /dev/sr0 > /dev/null n=$? if [ "$n" -eq '251' ];then eject /dev/sr0;fi
Further again to my #10 comment:
My apologies, the shell script '/usr/local/ bin/sr0_ change. sh' above posted only works for dvd media.
The following should (?) work for other media (eg. audio CDs) as well:
#!/bin/sh
dvd+rw-mediainfo /dev/sr0 > /dev/null
n=$?
if [ "$n" -eq '251' ];then eject /dev/sr0;fi