chiark / gitweb /
rules: SUSE update
[elogind.git] / etc / udev / suse / 50-udev-default.rules
index 838d5b9..1d57f0a 100644 (file)
@@ -1,32 +1,27 @@
 # console
-KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
-KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
-KERNEL=="vcs*",                        NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
-KERNEL=="vcsa*",               NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
-KERNEL=="tty",                 NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
-KERNEL=="tty[0-9]*",           NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
-KERNEL=="console",             NAME="%k", MODE="600", OPTIONS="last_rule"
-KERNEL=="ptmx",                        NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
+KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="tty",                 GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="tty[0-9]*|vcs*",      GROUP="tty", MODE="0620", OPTIONS="last_rule"
+KERNEL=="ptmx",                        GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="console",             MODE="0600", OPTIONS="last_rule"
 
 # serial devices
-KERNEL=="tty[A-Z]*",           NAME="%k", GROUP="uucp"
-KERNEL=="pppox*",              NAME="%k", GROUP="uucp"
-KERNEL=="ircomm*",             NAME="%k", GROUP="uucp"
-KERNEL=="modems/mwave*",       NAME="%k", GROUP="uucp"
-KERNEL=="hvc*",                        NAME="%k", GROUP="uucp"
-KERNEL=="hvsi*",               NAME="%k", GROUP="uucp"
-KERNEL=="iseries/vtty*",       NAME="%k", GROUP="uucp"
-KERNEL=="ttyUSB*", SYSFS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot"
+KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
+KERNEL=="hvc*|hvsi*",          GROUP="uucp"
+KERNEL=="iseries/vtty*",       GROUP="uucp"
+KERNEL=="mwave",               NAME="modems/%k", GROUP="uucp"
+KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot"
+KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*", SYMLINK+="pilot"
+KERNEL=="ppp",                 MODE="0600", OPTIONS+="ignore_remove"
 
 # video/graphics
 SUBSYSTEM=="video4linux",      GROUP="video"
 SUBSYSTEM=="graphics"          GROUP="video"
-KERNEL=="vtx*",                        NAME="%k", GROUP="video"
-KERNEL=="vbi*",                        NAME="%k", GROUP="video"
-KERNEL=="winradio*",           NAME="%k", GROUP="video"
-KERNEL=="vttuner*",            NAME="%k", GROUP="video"
-KERNEL=="nvidia*",             NAME="%k", GROUP="video"
-KERNEL=="nvidiactl*",          NAME="%k", GROUP="video"
+KERNEL=="vtx*|vbi*",           GROUP="video"
+KERNEL=="winradio*",           GROUP="video"
+KERNEL=="vttuner*",            GROUP="video"
+KERNEL=="nvidia*|nvidiactl*",  GROUP="video"
 KERNEL=="video0",              SYMLINK+="video"
 KERNEL=="radio0",              SYMLINK+="radio"
 KERNEL=="vbi0",                        SYMLINK+="vbi"
@@ -36,18 +31,15 @@ KERNEL=="pmu",                      GROUP="video"
 SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
 
 # input devices
-KERNEL=="mice",                        NAME="input/%k", MODE="0640"
-KERNEL=="mouse*",              NAME="input/%k", MODE="0640"
-KERNEL=="event*",              NAME="input/%k", MODE="0640"
+KERNEL=="mouse*|mice|event*",  NAME="input/%k", MODE="0640"
 KERNEL=="js*",                 NAME="input/%k", MODE="0644"
-KERNEL=="ts*",                 NAME="input/%k", MODE="0600"
-KERNEL=="uinput",              NAME="input/%k", MODE="0600"
-KERNEL=="lirc0",               NAME="%k", SYMLINK+="lirc"
+KERNEL=="ts*|uinput",          NAME="input/%k", MODE="0600"
+KERNEL=="lirc0",               SYMLINK+="lirc"
 
 # printer
 SUBSYSTEM=="usb",              KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
-SUBSYSTEM=="printer",          KERNEL=="lp*", NAME="%k", GROUP="lp"
-KERNEL=="irlpt*",              NAME="%k", GROUP="lp"
+SUBSYSTEM=="printer",          KERNEL=="lp*", GROUP="lp"
+KERNEL=="irlpt*",              GROUP="lp"
 
 # cpu devices
 KERNEL=="cpu[0-9]*",           NAME="cpu/%n/cpuid"
@@ -55,100 +47,77 @@ KERNEL=="msr[0-9]*",               NAME="cpu/%n/msr"
 KERNEL=="microcode",           NAME="cpu/microcode", MODE="0600"
 
 # IEEE1394 devices
-KERNEL=="raw1394*",            NAME="%k", GROUP="video"
-KERNEL=="dv1394*",             NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
-KERNEL=="video1394*",          NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
+KERNEL=="raw1394*",            GROUP="video"
+KERNEL=="dv1394*",             SYMLINK+="dv1394/%n", GROUP="video"
+KERNEL=="video1394*",          SYMLINK+="video1394/%n", GROUP="video"
 
-# 183 = /dev/hwrng        Generic random number generator
 KERNEL=="hw_random",           NAME="hwrng", SYMLINK+="%k"
-# 219 /dev/modems/mwave MWave modem firmware upload
-KERNEL=="mwave",               NAME="modems/%k"
-# 169 /dev/specialix_rioctl Specialix RIO serial control
 KERNEL=="rioctl",              NAME="specialix_rioctl", SYMLINK+="%k"
-# 167 /dev/specialix_sxctl Specialix serial control
 KERNEL=="sxctl",               NAME="specialix_sxctl", SYMLINK+="%k"
 
 # network
-KERNEL=="tun", NAME="net/%k", MODE="0600"
+KERNEL=="tun",                 NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
 
 # misc devices
-KERNEL=="mem",                 NAME="%k", GROUP="kmem", MODE="640"
-KERNEL=="kmem",                        NAME="%k", GROUP="kmem", MODE="640"
-KERNEL=="port",                        NAME="%k", GROUP="kmem", MODE="640"
-KERNEL=="nvram",               NAME="%k", GROUP="kmem", MODE="600"
-KERNEL=="null",                        NAME="%k", MODE="666"
-KERNEL=="zero",                        NAME="%k", MODE="666"
-KERNEL=="full",                        NAME="%k", MODE="622"
-KERNEL=="random",              NAME="%k", MODE="666"
-KERNEL=="urandom",             NAME="%k", MODE="644"
-KERNEL=="rtc",                 GROUP="audio"
+KERNEL=="mem|kmem|port",       GROUP="kmem", MODE="0640"
+KERNEL=="nvram",               GROUP="kmem", MODE="0600"
+KERNEL=="null|zero|random",    MODE="0666"
+KERNEL=="full",                        MODE="0622"
+KERNEL=="urandom",             MODE="0644"
+KERNEL=="rtc",                 MODE="0600"
+KERNEL=="fuse",                        MODE="0666"
 KERNEL=="sonypi",              MODE="0666"
 KERNEL=="agpgart",             MODE="0600", GROUP="video"
-KERNEL=="djs*",                        NAME="%k", MODE="644"
-KERNEL=="sgi_*",               NAME="%k", MODE="666"
-KERNEL=="rrom*",               NAME="%k", MODE="400"
-KERNEL=="rflash*",             NAME="%k", MODE="400"
-KERNEL=="usbscanner*",         NAME="%k", MODE="644"
-KERNEL=="3270/ttycons*",       NAME="%k", MODE="600"
-KERNEL=="3270/tub*",           NAME="%k", MODE="666"
-KERNEL=="3270/tubcons*",       NAME="%k", MODE="600"
-KERNEL=="ica",                 NAME="%k", MODE="666"
-KERNEL=="z90crypt",            NAME="%k", MODE="666"
-KERNEL=="mmtimer",             NAME="%k", MODE="444"
+KERNEL=="djs*",                        MODE="0644"
+KERNEL=="sgi_*",               MODE="0666"
+KERNEL=="rrom*",               MODE="0400"
+KERNEL=="rflash*",             MODE="0400"
+KERNEL=="usbscanner*",         MODE="0644"
+KERNEL=="3270/ttycons*",       MODE="0600"
+KERNEL=="3270/tub*",           MODE="0666"
+KERNEL=="3270/tubcons*",       MODE="0600"
+KERNEL=="ica",                 MODE="0666"
+KERNEL=="z90crypt",            MODE="0666"
+KERNEL=="mmtimer",             MODE="0644"
 KERNEL=="auer[0-9]*"           NAME="usb/%k"
 
 # packet writing interface
 KERNEL=="pktcdvd",             NAME="pktcdvd/control"
 KERNEL=="pktcdvd[0-9]*",       NAME="pktcdvd/%k"
 
-# fix floppy devices
-KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
-KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{cmos} -m %M /dev/%k"
-KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
+# additional floppy devices (no sysfs entries)
+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
 SUBSYSTEM=="block", GROUP="disk", MODE="0640"
+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n"
 
 # sd:          0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
 # sr:          4 TYPE_WORM, 5 TYPE_ROM
 # st/osst:     1 TYPE_TAPE
-ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'"
-ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="1", SYSFS{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="1", RUN+="/sbin/modprobe st"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
-SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
-
-# device mapper
-KERNEL=="device-mapper", NAME="%k", SYMLINK+="mapper/control"
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60"
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900"
+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
 
 # misc storage devices (non-block)
-KERNEL=="sg*",                 NAME="%k", GROUP="disk", MODE="640"
-KERNEL=="st*",                 NAME="%k", GROUP="disk"
-KERNEL=="nst*",                        NAME="%k", GROUP="disk"
-KERNEL=="initrd",              NAME="%k", GROUP="disk"
-KERNEL=="qft*",                        NAME="%k", GROUP="disk"
-KERNEL=="nqft*",               NAME="%k", GROUP="disk"
-KERNEL=="zqft*",               NAME="%k", GROUP="disk"
-KERNEL=="nzqft*",              NAME="%k", GROUP="disk"
-KERNEL=="rawqft*",             NAME="%k", GROUP="disk"
-KERNEL=="nrawqft*",            NAME="%k", GROUP="disk"
-KERNEL=="pf*",                 NAME="%k", GROUP="disk"
-KERNEL=="sch*",                        NAME="%k", GROUP="disk"
-KERNEL=="pt*",                 NAME="%k", GROUP="disk"
-KERNEL=="npt*",                        NAME="%k", GROUP="disk"
-KERNEL=="pg*",                 NAME="%k", GROUP="disk"
-KERNEL=="evms/block_device*",  NAME="%k", GROUP="disk"
-KERNEL=="rawctl*",             NAME="%k", GROUP="disk"
-KERNEL=="osst*",               NAME="%k", GROUP="disk"
-KERNEL=="nosst*",              NAME="%k", GROUP="disk"
+KERNEL=="sg*",                 GROUP="disk", MODE="0640"
+KERNEL=="st*|nst*",            GROUP="disk"
+KERNEL=="qft*|nqft*|zqft*|nzqft*|rawqft*|nrawqft", GROUP="disk"
+KERNEL=="ht*|nht*",            GROUP="disk"
+KERNEL=="pf*",                 GROUP="disk"
+KERNEL=="sch*",                        GROUP="disk"
+KERNEL=="pt*|npt*",            GROUP="disk"
+KERNEL=="pg*",                 GROUP="disk"
+KERNEL=="evms/block_device*",  GROUP="disk"
+KERNEL=="rawctl*",             NAME="raw/%k", GROUP="disk"
+SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
+KERNEL=="osst*|nosst*",                NAME="%k", GROUP="disk"
 KERNEL=="iseries/vt*",         NAME="%k", GROUP="disk"
 KERNEL=="iseries/nvt*",                NAME="%k", GROUP="disk"
 KERNEL=="iseries/ibmsis*",     NAME="%k", GROUP="disk"
 
 # libusb device access
-SUBSYSTEM=="usb_device", 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"