# Invalid UDEV rules [SOLVED]

## mslinn

I recently started noticing errors when booting.  /var/log/messages says:

```
Nov 10 20:57:33 egg udevd[1218]: add_to_rules: invalid SUBSYSTEMS operation

Nov 10 20:57:33 egg udevd[1218]: add_to_rules: invalid rule '/etc/udev/rules.d/10-udev.rules:1'

Nov 10 20:57:33 egg udevd[1218]: add_to_rules: invalid KERNEL operation

Nov 10 20:57:33 egg udevd[1218]: add_to_rules: invalid rule '/etc/udev/rules.d/10-udev.rules:2'

```

Here is /etc/udev/rules.d/10-udev.rules

```
BUS="usb", SYSFS[product}="DDX-C1000", KERNEL="sd*[0-9]", NAME="%k" SYMLINK="digcam/cam%n"

KERNEL="mouse*", BUS="usb", SYSFS{product}=="USB Receiver", SYSFS{manufacturer}=="Logitech", MODE="0644", GROUP="plugdev", OWNER="mslinn", NAME="input/mouse2"
```

I confess that UDEV is a bit of a mystery to me.Last edited by mslinn on Thu Nov 13, 2008 12:50 am; edited 1 time in total

----------

## timeBandit

 *mslinn wrote:*   

> Here is /etc/udev/rules.d/10-udev.rules
> 
> ```
> BUS="usb", SYSFS[product}="DDX-C1000", KERNEL="sd*[0-9]", NAME="%k" SYMLINK="digcam/cam%n"
> 
> ...

 

The rules confuse the == (equality test) and = (assignment) operators. Use the former to test device attributes for identification and the latter to create and configure the device nodes. The two are not interchangeable.

You probably wanted this:

```
BUS=="usb", SYSFS[product}=="DDX-C1000", KERNEL=="sd*[0-9]", NAME="%k" SYMLINK="digcam/cam%n"

KERNEL=="mouse*", BUS=="usb", SYSFS{product}=="USB Receiver", SYSFS{manufacturer}=="Logitech", MODE="0644", GROUP="plugdev", OWNER="mslinn", NAME="input/mouse2"
```

Here is an excellent guide to writing udev rules, by one of Gentoo's own erstwhile kernel hackers.

----------

## mslinn

I didn't write these rules, I found them in my system.  I'll make the changes you suggest, reboot and see what happens.

----------

## mslinn

I just noticed that SYSFS[product} looks suspicious.  Should it be SYSFS[product] instead?

----------

## timeBandit

 *mslinn wrote:*   

> I just noticed that SYSFS[product} looks suspicious.  Should it be SYSFS[product] instead?

 Good catch, I didn't notice that. It should be SYSFS{product}.

----------

## mslinn

Everything seems ok.

----------

