* 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
* Re: ide-devfs.sh and Gentoo [u]
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
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Schweizer @ 2004-12-13 20:54 UTC (permalink / raw)
To: linux-hotplug
On Mon, 13 Dec 2004 22:35:41 +0200, Martin Schlemmer [c]
<azarah@nosferatu.za.org> wrote:
> 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 ....
I dont think this is a good fix to this. The real right fix might be:
http://bugs.gentoo.org/show_bug.cgi?ids064
I think we should rules.d make match symlinks, what do you think?
We should then remove the GROUP= fix from the ide-devfs.sh rule.
I think your patch is not a proper solution because it calls
cdsymlinks.sh a second time and has 2 greps in it, will that not make
udev slow?
Stefan
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ide-devfs.sh and Gentoo [u]
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
2 siblings, 0 replies; 4+ messages in thread
From: Martin Schlemmer [c] @ 2004-12-13 21:12 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]
On Mon, 2004-12-13 at 21:54 +0100, Stefan Schweizer wrote:
> On Mon, 13 Dec 2004 22:35:41 +0200, Martin Schlemmer [c]
> <azarah@nosferatu.za.org> wrote:
> > 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 ....
> I dont think this is a good fix to this. The real right fix might be:
>
> http://bugs.gentoo.org/show_bug.cgi?id=73064
>
> I think we should rules.d make match symlinks, what do you think?
> We should then remove the GROUP= fix from the ide-devfs.sh rule.
>
That gives the same as the GROUP= currently does (which in my mind sorda
give that that bug is already fixed ....)
We (gentoo) wants GROUP=cdrw, which means that either:
1) Call cdsymlinks.sh in a rule like mentioned bug
2) write a different script to return cdrw if it is a
cdrw/dvdrw/whatever. I did not however want to do this, as it would
mean maintaining the same code in two places.
> I think your patch is not a proper solution because it calls
> cdsymlinks.sh a second time and has 2 greps in it, will that not make
> udev slow?
>
It only does that if its a cdrom, and you usually do not have that many
cdroms, do you ?
--
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
* Re: ide-devfs.sh and Gentoo [u]
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
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Schweizer @ 2004-12-13 21:26 UTC (permalink / raw)
To: linux-hotplug
On Mon, 13 Dec 2004 23:12:25 +0200, Martin Schlemmer [c]
<azarah@nosferatu.za.org> wrote:
> That gives the same as the GROUP= currently does (which in my mind sorda
> give that that bug is already fixed ....)
> We (gentoo) wants GROUPÍrw, which means that either:
> 1) Call cdsymlinks.sh in a rule like mentioned bug
> 2) write a different script to return cdrw if it is a
> cdrw/dvdrw/whatever. I did not however want to do this, as it would
> mean maintaining the same code in two places.
or if that bug would be solved in the proper way we could add a proper
rule like:
cdrw:root:cdrw:0660
That would effectively avoid calling cdsymlinks.sh twice and maybe
there is not only this cdrw issue, but also others, then with the
symlink-following-patch we could also easier change their permissions
without the need for userspace helpers or extra rules.
Stefan
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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
^ 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).