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".
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.
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
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox