linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: trying to add a rule for USB external CD - a newbie
Date: Sun, 26 Mar 2006 16:32:52 +0000	[thread overview]
Message-ID: <20060326163252.GA6525@vrfy.org> (raw)
In-Reply-To: <d0383f90603260817s5b6200dem4711b3534334bd90@mail.gmail.com>

On Sun, Mar 26, 2006 at 06:17:01PM +0200, Ian Brown wrote:
> Hello,
>  I am trying to add a rule for USB external CD  for udev;
> this device uses scsi emulation; it;s device file is /dev/sr0
> 
> so I went to /etc/udev/rules.d and edited 50-udev.rules:
> I added in the end this line:
> KERNEL="sr[0-9]*", BUS="scsi", PROGRAM="/etc/udev/scripts/mount-cdrom.sh"
> 
> where mount-cdrom.sh has 2 lines :
> echo "in mount-cdrom" >> /etc/udev/mountcdrom.log
> mount /dev/sr0 /mnt/extcd
> I restared udev (by /sbin/start_udev).
> 
> I  disconented the USB cdrom and connected it again.
> 
> I see that the cdrom is not mounted; On the other hand I see that we do create
> the mount_cdrom log file.
> 
> What am I doing wrong?

Use RUN+=, at the time PROGRAM runs you don't have a device node.
And use "=" if you compare values.

Kay


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2006-03-26 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-26 16:17 trying to add a rule for USB external CD - a newbie Ian Brown
2006-03-26 16:32 ` Kay Sievers [this message]
2006-03-27  7:09 ` Ian Brown
2006-03-27 11:32 ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060326163252.GA6525@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).