Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Nedd help with udev-rules. (http://www.linux-archive.org/gentoo-user/566664-nedd-help-udev-rules.html)

Dan Johansson 08-21-2011 06:26 PM

Nedd help with udev-rules.
 
Hi,

I need some help with writing udev-rules for capi.
After playing around some I decided to ask for help here as can't really get
it to work.

What I want ist the following:
/dev/capi20 68,0
/dev/capi/capi# 191,#

68,0 = Major 68, Minor 0
191,# = Major 191, Minor 0 untill 31

If I have no udev-rule I get the following:
/dev/capi 68,0
/dev/capi# 191,#

with 'ATTR{dev}="68:0", NAME="capi20" ' added I only get the following:
/dev/capi20 191,32

and with 'ATTR{dev}="191:[0-9]*", NAME="capi/capi%n" ' the following:
/dev/capi/capi 68,0
/dev/capi/capi# 191,#

And with both '"ATTR{dev}="68:0", NAME="capi20" ' and 'ATTR{dev}="191:
[0-9]*", NAME="capi/capi%n" ' this:
/dev/capi/capi 68,0
/dev/capi/capi# 191,#
(No change in comparison with only the 'ATTR{dev}=191:...' rule)

And if I change the order in the rules-file:
/dev/capi20 191,31


Can some udev-crack (or someone else) tell my what I am doing wrong?

Regards,
--
Dan Johansson, <http://www.dmj.nu>
************************************************** *
This message is printed on 100% recycled electrons!
************************************************** *

Dan Johansson 08-22-2011 11:44 AM

Nedd help with udev-rules.
 
On Sunday 21 August 2011 20.26:40 Dan Johansson wrote:
> Hi,
>
> I need some help with writing udev-rules for capi.
> After playing around some I decided to ask for help here as can't really
> get it to work.
>
> What I want ist the following:
> /dev/capi20 68,0
> /dev/capi/capi# 191,#
>
> 68,0 = Major 68, Minor 0
> 191,# = Major 191, Minor 0 untill 31
>
> If I have no udev-rule I get the following:
> /dev/capi 68,0
> /dev/capi# 191,#
>
> with 'ATTR{dev}="68:0", NAME="capi20" ' added I only get the following:
> /dev/capi20 191,32
>
> and with 'ATTR{dev}="191:[0-9]*", NAME="capi/capi%n" ' the following:
> /dev/capi/capi 68,0
> /dev/capi/capi# 191,#
>
> And with both '"ATTR{dev}="68:0", NAME="capi20" ' and 'ATTR{dev}="191:
> [0-9]*", NAME="capi/capi%n" ' this:
> /dev/capi/capi 68,0
> /dev/capi/capi# 191,#
> (No change in comparison with only the 'ATTR{dev}=191:...' rule)
>
> And if I change the order in the rules-file:
> /dev/capi20 191,31
>
>
> Can some udev-crack (or someone else) tell my what I am doing wrong?
>
> Regards,
Hi again,

I found the problem (me). The correct syntax should be:
ATTR{dev}=="68:0", NAME="capi20"
ATTR{dev}=="191:[0-9]*", NAME="capi/capi%n"

Notice the '==' instead of '=' after ATTR{dev}.

Cheers,
--
Dan Johansson, <http://www.dmj.nu>
************************************************** *
This message is printed on 100% recycled electrons!
************************************************** *


All times are GMT. The time now is 05:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.