linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ide-devfs.sh and Gentoo [u]
@ 2004-12-13 20:35 Martin Schlemmer [c]
  2004-12-13 20:54 ` Stefan Schweizer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Martin Schlemmer [c] @ 2004-12-13 20:35 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

Hi,

We have a problem in Gentoo that we use the group 'cdrw' for burners,
but ide-devfs.sh assigns 'cdrom' to them.  Below patch is for
comments .. it uses cdsymlinks.sh to try and figure out if we have a
burner or not ....

-----
--- 1/udev-048/extras/ide-devfs.sh      2004-12-13 22:27:17.000000000 +0200
+++ 2/udev-048/extras/ide-devfs.sh      2004-12-13 22:29:06.000000000 +0200
@@ -36,6 +36,10 @@
 if [ -z "$3" ] && [ -f /proc/ide/${1}/media ]; then
        MEDIA=`cat /proc/ide/${1}/media`
        if [ "${MEDIA}" = "cdrom" ]; then
+               if [ -n "`grep '^cdrw:' /etc/group`" ] && \
+                  [ -n "`"${0%/*}/cdsymlinks.sh" "$1" | grep 'rw' 2>/dev/null`" ]; then
+                       MEDIA="cdrw"
+               fi
                echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom` ${MEDIA}
        elif [ "${MEDIA}" = "floppy" ]; then
                echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/disc floppies/floppy`get_dev_number $1 floppy`/disc ${MEDIA}
-----

More info might be gotten from here:

  http://bugs.gentoo.org/show_bug.cgi?id=73660


Thanks,

-- 
Martin Schlemmer


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-12-13 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-13 20:35 ide-devfs.sh and Gentoo [u] Martin Schlemmer [c]
2004-12-13 20:54 ` Stefan Schweizer
2004-12-13 21:12 ` Martin Schlemmer [c]
2004-12-13 21:26 ` Stefan Schweizer

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).