On 14 Jul 2008 at 23:07, Denys Vlasenko wrote:

From:                   Denys Vlasenko <[EMAIL PROTECTED]>
To:                     [email protected]
Subject:                Re: Creating /dev/cdrom
Date sent:              Mon, 14 Jul 2008 23:07:26 +0200
Copies to:              "Michael D. Setzer II" <[EMAIL PROTECTED]>,
        Bernhard Fischer <[EMAIL PROTECTED]>

> On Monday 14 July 2008 18:34, Michael D. Setzer II wrote:
> > On 14 Jul 2008 at 16:58, Bernhard Fischer wrote:
> > 
> > Date sent:          Mon, 14 Jul 2008 16:58:00 +0200
> > From:               Bernhard Fischer <[EMAIL PROTECTED]>
> > To:                 "Michael D. Setzer II" <[EMAIL PROTECTED]>
> > Copies to:          [email protected]
> > Subject:            Re: Creating /dev/cdrom
> > 
> > > On Mon, Jul 14, 2008 at 07:51:08AM -0700, Michael D. Setzer II wrote:
> > > >Is there a process to create /dev/cdrom to point to the cdrom device?
> > > 
> > > Sure. Suppose your cdrom lives at hdc, somthing like the following
> > > should do the trick:
> > > echo 'hdc root:cdrom 660  *ln -s $MDEV cdrom' >> /etc/mdev.conf
> > > 
> > > HTH,
> > > 
> > 
> > As a quick follow up: Here is a script that I just wrote that seems to do 
> > what I 
> > want, but would only work with a hdx cdrom. It also seems to be more than 
> > should be required. It just list the hdx devices that were found, and 
> > checks to 
> > see if one isn't listed in the /proc/partitions, and assumes that is the 
> > cdrom.
> 
> This is also a good hint:
> 
> # cat /sys/block/hdb/removable
> 1
> 
> But I doubt usefulness of /dev/cdrom link in general. It sounds ah-hoc'ish.
> "Just because usually machines have one cdrom".
>

That is a good point, and why I was looking for a best solution. Also, 
busybox eject defaults to /dev/cdrom?

> Bu what if some machine has two? Or if this /dev/hdX device is not in
> /proc/partitions and is removable, but is NOT a cdrom?! All script hell
> is very likely to break loose.
> 

Another good point, since some systems migh thave ZIP or other device. 
Another option, would be if it is possible to get the device from which the 
system booted? The only issue is: If they leave the CD in, it will reboot into 
the G4L again, and they will have to reboot again.

> Don't torture yourself, and just use appropriate /dev/hdX. A-la
> 
> # If empty, we don't need to eject anything.
> # Else space-separated list of devices.
> NEED_EJECT_ON_REBOOT="/dev/hdb"
> ...
> for dev in $NEED_EJECT_ON_REBOOT; do
>       eject $dev
> done
> 

I've actually had in the example front end script
#eject /dev/hda
#eject /dev/hdb
eject /dev/hdc
#eject /dev/hdd

Again, thanks for the time and info.


> --
> vda
> 


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:[EMAIL PROTECTED]                            
  mailto:[EMAIL PROTECTED]
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

[EMAIL PROTECTED] CREDITS
SETI 5,911,348.7549 | EINSTEIN 1,802,388.6269 | ROSETTA 
554,380.6287

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to