# SOLVED:udev symlink rule not working

## afabco

hi folks.

Trying to set up a symlink for my ipod.  Here's the rule:

 *Quote:*   

> michelle rules.d # pwd
> 
> /etc/udev/rules.d
> 
> michelle rules.d # ls -la
> ...

 

When I plug in the ipod, here's the results:

dmesg:

 *Quote:*   

> 
> 
> <snip>
> 
> usb 1-10: new high speed USB device using ehci_hcd and address 4
> ...

 

 *Quote:*   

> # udevmonitor
> 
> udevmonitor prints the received event from the kernel [UEVENT]
> 
> and the event which udev sends out after rule processing [UDEV]
> ...

 

 *Quote:*   

> ~ $ lshal -m
> 
> Start monitoring devicelist:
> 
> -------------------------------------------------
> ...

 

other information:

 *Quote:*   

> 
> 
> michelle rules.d # lsmod
> 
> Module                  Size  Used by
> ...

 

emerge --info:

 *Quote:*   

> michelle rules.d # emerge --info
> 
> >>> cfg-update-1.8.2-r1: Creating checksum index...
> 
> Portage 2.1.2.7 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.5-r3, 2.6.20-gentoo-r8 x86_64)
> ...

 

Any ideas?

thx in advance

----------

## didymos

Have you tried changing "sd?2" to just "sd*"?  The other parameters should restrict the match to just the ipod.

----------

## afabco

Ok,  tried both sd* and sd*2.  udevstart after each.  No change.

thanks

----------

## quatsch

try changing the udev rule. SYSFS is deprecated, I think. Use instead ATTR or ATTRS.

----------

## didymos

Is this the last rule that could affect that device?  I think with udev, the last rule found overrides any previous one.

----------

## PaulBredbury

 *afabco wrote:*   

> manufacture

 

It's manufacturer

----------

## didymos

 *PaulBredbury wrote:*   

>  *afabco wrote:*   manufacture 
> 
> It's manufacturer

 

Umm, yeah.  Or that. Damn it.

----------

## afabco

that was it.  thanks!

----------

## JohnN

 *Quote:*   

> try changing the udev rule. SYSFS is deprecated, I think. Use instead ATTR or ATTRS.

 

Deprecated since when? All of the howtos and guides I can find still give the SYSFS sntax. None of my previously functioning (with udev-087) rules are working now after upgrading to udev-104.  Neither ATTR or ATTRS works simply substituting it for SYSFS. Are there other changes in rule syntax?

The device I'm focusing on is the following:

 *Quote:*   

> BUS="usb", SYSFS{serial}="058F118111B", KERNEL="sd?1", NAME="%k", SYMLINK="flash"

 

Does that look right? It always worked before.

----------

## quatsch

SYSFS might still work but the man page no longer mentions it. Instead, there is ATTR and ATTRS.

Also, the new syntax is stricter. You need == for comparison (see man udev). So you should at least change the rule to

BUS=="usb", SYSFS{serial}=="058F118111B", KERNEL=="sd?1", NAME="%k", SYMLINK="flash"

I would also change SYSFS to ATTRS.

cheers

----------

## JohnN

Yes, the stricter syntax ("==") plus ATTRS instead of SYSFS now works for some media, setting up the /dev/ links anyway. (I can mount a flash card but have  yet to sync my palm pilot under the new udev, although the correct link gets set up. Thanks!

----------

