chiark / gitweb /
update SUSE rules
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 23 Apr 2007 16:22:08 +0000 (18:22 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 23 Apr 2007 16:22:08 +0000 (18:22 +0200)
etc/udev/suse/05-udev-early.rules
etc/udev/suse/50-udev-default.rules
etc/udev/suse/60-persistent-input.rules
etc/udev/suse/64-device-mapper.rules
etc/udev/suse/64-md-raid.rules [new file with mode: 0644]

index 7e94ee9..ec94c35 100644 (file)
@@ -1,3 +1,3 @@
 # sysfs is populated after the event is sent
-ACTION=="add", SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt"
+ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
 
index 2d4c418..d63c047 100644 (file)
@@ -91,7 +91,6 @@ KERNEL=="pktcdvd",            NAME="pktcdvd/control"
 KERNEL=="pktcdvd[0-9]*",       NAME="pktcdvd/%k"
 
 # additional floppy devices (no sysfs entries)
-KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
 KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k"
 
 # block devices
@@ -130,6 +129,7 @@ KERNEL=="iseries/ibmsis*",  NAME="%k", GROUP="disk"
 
 # libusb device access
 SUBSYSTEM=="usb_device", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
+#SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
 
 # kernel firmware loader
 SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh"
index 4bc034c..503e61e 100644 (file)
@@ -14,15 +14,16 @@ DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
 ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
 ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
 
-ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
+# fill empty serial number
+ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
 
 # by-id links
-KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
+KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
 KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
 
 # by-path
 IMPORT{program}="path_id %p"
-ENV{ID_PATH}=="?*", KERNEL=="mouse*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
+ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
 ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"
 
 LABEL="persistent_input_end"
index 377af78..a84b107 100644 (file)
@@ -3,14 +3,15 @@
 
 KERNEL=="device-mapper", SYMLINK+="mapper/control"
 
-KERNEL=="dm-*", ACTION=="add|change", GOTO="device_mapper_do"
-GOTO="device_mapper_end"
+KERNEL!="dm-*", GOTO="device_mapper_end"
+ACTION!="add|change", GOTO="device_mapper_end"
 
-LABEL="device_mapper_do"
+# skip snapshot and error tables
 PROGRAM!="/sbin/dmsetup status -j %M -m %m", GOTO="device_mapper_end"
 RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
 
 IMPORT{program}="vol_id --export $tempnode"
+OPTIONS="link_priority=-100"
 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
 
diff --git a/etc/udev/suse/64-md-raid.rules b/etc/udev/suse/64-md-raid.rules
new file mode 100644 (file)
index 0000000..9070e21
--- /dev/null
@@ -0,0 +1,12 @@
+# md links hook into "change" events, when the array becomes available
+
+KERNEL!="md[0-9]*", GOTO="md_end"
+ACTION!="add|change", GOTO="md_end"
+
+ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
+
+IMPORT{program}="vol_id --export $tempnode"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+
+LABEL="md_end"