chiark / gitweb /
update SUSE rules
[elogind.git] / etc / udev / suse / udev.rules
index 8791e42..8ffd645 100644 (file)
@@ -27,8 +27,11 @@ 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=="video0",              SYMLINK+="video"
+KERNEL=="radi0",               SYMLINK+="radio"
 
 # dvb
+#SUBSYSTEM="dvb", PROGRAM="/bin/sh -c 'X=%k X=$${X#dvb} A=$${X%%%%.*} D=$${X#*.}; echo dvb/adapter$$A/$$D'", NAME="%c", GROUP="video"
 KERNEL=="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c", GROUP="video"
 
 # ALSA/sound
@@ -46,7 +49,7 @@ SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="1604/8006/*", RUN+="/sbin/fxload
 SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="1604/8001/*", RUN+="/sbin/startproc /usr/bin/us428control"
 SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="1604/8005/*", RUN+="/sbin/startproc /usr/bin/us428control"
 SUBSYSTEM=="sound", KERNEL=="controlC?", RUN+="/usr/sbin/alsactl -F restore %n"
-SUBSYSTEM=="sound", KERNEL=="hwC?D2", DRIVER=="EMU10K1_Audigy", RUN+="/etc/dev.d/snd/hwC0D2/alsa"
+SUBSYSTEM=="sound", KERNEL=="hwC?D2", DRIVER=="EMU10K1_Audigy", RUN+="/etc/alsa.d/udev-soundfont"
 
 # OpenCT (SmartCard)
 SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="973/1*", RUN+="/usr/sbin/openct-control attach $env{DEVICE} usb:$env{PRODUCT}"
@@ -60,34 +63,6 @@ SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="76b/1784*", RUN+="/usr/sbin/open
 SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="8d4/9*", RUN+="/usr/sbin/openct-control attach $env{DEVICE} usb:$env{PRODUCT}"
 SUBSYSTEM=="usb", ACTION=="add", ENV{INTERFACE}=="11/*", RUN+="/usr/sbin/openct-control attach $env{DEVICE} usb:$env{PRODUCT}"
 
-# CAPI devices
-SUBSYSTEM="capi",              GROUP="dialout"
-KERNEL=="capi",                        NAME="capi20", SYMLINK+="isdn/capi20"
-KERNEL=="capi*",               NAME="capi/%n"
-
-# ISDN
-KERNEL=="isdn*",               NAME="%k", MODE="600"
-KERNEL=="isdnctrl*",           NAME="%k", MODE="600"
-KERNEL=="ippp*",               NAME="%k", MODE="600"
-KERNEL=="isdninfo*",           NAME="%k", MODE="444"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/c00*", IMPORT="/bin/echo 'DRV=fcusb'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/1000*", IMPORT="/bin/echo -e 'DRV=fcusb2\nFIRMWARE=fus2base.frm'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/1900*", IMPORT="/bin/echo -e 'DRV=fcusb2\nFIRMWARE=fus3base.frm'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/2000*", IMPORT="/bin/echo DRV=fxusb", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/2200*", IMPORT="/bin/echo DRV=bfusb", RUN+="/etc/sysconfig/isdn/scripts/load-bfusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/2300*", IMPORT="/bin/echo -e 'DRV=fcdslusb\nFIRMWARE=fdsubase.frm\nDSL_CONTR=dslisdn'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/2800*", IMPORT="/bin/echo DRV=fxusb_CZ", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/3000*", IMPORT="/bin/echo -e 'DRV=fcdslusba\nFIRMWARE=fdsabase.frm\nDSL_CONTR=dslonly\nISDNLOG_START=no'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/3500*", IMPORT="/bin/echo -e 'DRV=fcdslslusb\nFIRMWARE=fdlubase.frm\nDSL_CONTR=dslonly\nISDNLOG_START=no'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/3600*", IMPORT="/bin/echo -e 'DRV=fcdslusb2\nFIRMWARE=fds2base.frm\nDSL_CONTR=dslisdn'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/2805*", IMPORT="/bin/echo 'DRV=e2220pc'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/2806*", IMPORT="/bin/echo 'DRV=e5520pc'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/4401*", IMPORT="/bin/echo 'DRV=e2220pc'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="57c/4601*", IMPORT="/bin/echo 'DRV=e5520pc'", RUN+="/etc/sysconfig/isdn/scripts/load-avmusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="483/4810*", IMPORT="/bin/echo 'DRV=hisax_st5481'", RUN+="/etc/sysconfig/isdn/scripts/load-hisaxusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="959/2bd0*", IMPORT="/bin/echo 'DRV=hfc_usb'", RUN+="/etc/sysconfig/isdn/scripts/load-hisaxusb"
-SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="9bf/*", IMPORT="/bin/echo 'DRV=auerswald'", RUN+="/etc/sysconfig/isdn/scripts/load-auerswald"
-
 # input devices
 KERNEL=="mice",                        NAME="input/%k", MODE="0640"
 KERNEL=="mouse*",              NAME="input/%k", MODE="0640"
@@ -127,7 +102,7 @@ KERNEL=="sxctl",            NAME="specialix_sxctl", SYMLINK+="%k"
 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"
+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"
@@ -149,9 +124,9 @@ KERNEL=="z90crypt",         NAME="%k", MODE="666"
 KERNEL=="mmtimer",             NAME="%k", MODE="444"
 
 # fix floppy devices
-KERNEL=="nvram", ACTION=="add", NAME="%k", MODE="600", RUN="/sbin/load_floppy_module"
-KERNEL=="fd*", ACTION=="add", SYSFS{device/cmos}=="*", RUN="/sbin/create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
-KERNEL=="fd*", ACTION=="remove", RUN="/sbin/remove_floppy_devices /dev/%k"
+KERNEL=="nvram", ACTION=="add", RUN+="/sbin/load_floppy_module"
+KERNEL=="fd*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="/sbin/create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
+KERNEL=="fd*", ACTION=="remove", RUN+="/sbin/remove_floppy_devices %k"
 
 # block devices
 SUBSYSTEM=="block", GROUP="disk", MODE="0640"
@@ -195,28 +170,28 @@ SUBSYSTEM!="block", GOTO="persistent_end"
 KERNEL=="ram*|loop*|fd*", GOTO="persistent_end"
 
 # never access removable ide devices, the drivers are causing event loops on open()
-SUBSYSTEM=="block", BUS=="ide", SYSFS{removable}="1", GOTO="persistent_end"
+SUBSYSTEM=="block", BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end"
 
 # by-id (hardware serial number)
 KERNEL=="hd*[!0-9]", IMPORT="/sbin/ata_id --export $tempnode"
-KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
-KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
+KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
+KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
 
-KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*", IMPORT="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394\nID_TYPE=disk'"
+KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*", IMPORT="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394\n'"
 KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT="/sbin/usb_id -x"
 KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT="/sbin/scsi_id -g -x -s %p"
 KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT="/sbin/scsi_id -g -x -a -s %p"
 KERNEL=="dasd*[!0-9]", IMPORT="/sbin/dasd_id --export $tempnode"
-KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="$env{ID_TYPE}/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
 
 # for partitions import parent information
 KERNEL=="sd*[0-9]|dasd*[0-9]", IMPORT{parent}=="ID_*"
-KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="$env{ID_TYPE}/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
+KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
 
 # by-path (shortest physical path)
-KERNEL=="*[!0-9]", ENV{ID_TYPE}=="?*", IMPORT="/sbin/path_id %p", SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}"
+KERNEL=="*[!0-9]", ENV{ID_TYPE}=="?*", IMPORT="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
 KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
-KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}-part%n"
+KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
 
 # by-label/by-uuid (filesystem properties)
 KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end"
@@ -233,14 +208,15 @@ SUBSYSTEM=="net", ACTION=="remove", RUN+="/sbin/ifdown %k -o hotplug"
 
 # libusb device access (mount usbfs or usbdev nodes)
 DEVPATH=="/module/usbcore", ACTION=="add", RUN+="/bin/mount -t usbfs usbfs /proc/bus/usb"
-SUBSYSTEM="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK="%c"
+SUBSYSTEM="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"
 
 # firmware loader
-SUBSYSTEM=="firmware", ACTION=="add", RUN+="/etc/hotplug.d/firmware/50-firmware.hotplug"
+SUBSYSTEM=="firmware", ACTION=="add", RUN+="/sbin/firmware.hotplug.sh"
 
 # SUSE system integration
 SUBSYSTEM=="pci", ACTION=="add", RUN+="/sbin/hwup bus-pci-%k -o hotplug"
 SUBSYSTEM=="usb", ACTION=="add", RUN+="/sbin/hwup usb-devpath-/sys%p -o hotplug"
+LABEL="after_usb_default"
 SUBSYSTEM=="ieee1394", ACTION=="add", RUN+="/sbin/hwup ieee1394-devpath-/sys%p -o hotplug"
 SUBSYSTEM=="ccw", ACTION=="add", RUN+="/sbin/hwup ccw-devpath-/sys%p -o hotplug"
 SUBSYSTEM=="ccwgroup", ACTION=="add", RUN+="/sbin/hwup ccwgroup-devpath-/sys%p -o hotplug"