[PLUG] detecting music CD
Joe Pruett
joey at clean.q7.com
Sat Feb 28 22:10:13 UTC 2009
On Sat, 28 Feb 2009, Sean Whitney wrote:
> I have small shell script that used to detect that a cd had been
> inserted by looking at
>
> /proc/ide/hdc/capacity
>
> Well it's been so long since I used it, that the 2.6 kernel has made
> this look like historic cruft.
>
> Anyone have any way's to detect that cd has been inserted?
>
> I've poked around the /proc and /sys directories and I haven't found
> anything interesting yet.
the general info you want to be googling is hotplug. it handles removable
media and devices.
More information about the PLUG
mailing list