[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



What you want to do needs to use an ioctl to wait for a media change
event.  I don't know of a way to do that from BASH directly.  If you
try to open the cdrom with something like:
 5</dev/cdrom
but at least on my machine here, that actually closes the drive door and
the tells me that I have no media.  Oh well.

If you can use stuff other than strict shell scripts, then Perl/Python most
likely have the ability to do it, or if you can use and external program then
I would suspect that either of:
<a  rel="nofollow" href="http://www.risacher.org/pfl/cd_poll.c";>http://www.risacher.org/pfl/cd_poll.c</a>
<a  rel="nofollow" href="http://www.risacher.org/pfl/cdpoll-new.c";>http://www.risacher.org/pfl/cdpoll-new.c</a>

will suit your needs.

Jim P.


On Wed, 16 Feb 2005 02:14:09 +0000, Jay Loden &lt;jloden at toughguy.net&gt; wrote:
&gt; I am scripting a DVD backup solution, and the idea is for the script to email
&gt; the admin when it is ready for the backup, then the admin puts in the DVD and
&gt; the backup is performed.  Does anyone know of a way to eject the CD tray,
&gt; wait for the DVD insert and then when it's inserted, continue on with the
&gt; script (burn the backup)?
&gt; 
&gt; I know how to eject the tray, but not how to wait for and detect insertion of
&gt; the DVD.
&gt; 
&gt; -Jay
&gt; 
&gt; _______________________________________________
&gt; Ale mailing list
&gt; Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt;


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00632" href="msg00632.html">[ale] BASH script - wait for CD insert</a></strong>
<ul><li><em>From:</em> jloden at toughguy.net (Jay Loden)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00634.html">[ale] Open md5.asc files</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00636.html">[ale] BASH script - wait for CD insert</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00632.html">[ale] BASH script - wait for CD insert</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00636.html">[ale] BASH script - wait for CD insert</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00635"><strong>Date</strong></a></li>
<li><a href="threads.html#00635"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>