diff options
author | Marco d'Itri <md@Linux.IT> | 2008-07-11 10:27:55 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-07-11 10:27:55 +0200 |
commit | ad1be3e7ad01b263312eaf2a06db0c24c9c90441 (patch) | |
tree | b9ac619dc5bbccaf5c723b21f522148b80d680cc | |
parent | 98d8d24bcc668022857e1b4852ac37ce4400ddf8 (diff) |
rules: Debian update
-rw-r--r-- | etc/udev/debian/50-udev.rules (renamed from etc/udev/debian/udev.rules) | 61 | ||||
-rw-r--r-- | etc/udev/debian/60-persistent-input.rules (renamed from etc/udev/debian/persistent-input.rules) | 6 | ||||
-rw-r--r-- | etc/udev/debian/60-persistent-storage-tape.rules | 42 | ||||
-rw-r--r-- | etc/udev/debian/60-persistent-storage.rules | 109 | ||||
-rw-r--r-- | etc/udev/debian/60-persistent-v4l.rules | 17 | ||||
-rw-r--r-- | etc/udev/debian/75-cd-aliases-generator.rules (renamed from etc/udev/debian/cd-aliases-generator.rules) | 8 | ||||
-rw-r--r-- | etc/udev/debian/75-persistent-net-generator.rules | 86 | ||||
-rw-r--r-- | etc/udev/debian/80-drivers.rules (renamed from etc/udev/debian/hotplug.rules) | 12 | ||||
-rw-r--r-- | etc/udev/debian/91-permissions.rules (renamed from etc/udev/debian/permissions.rules) | 33 | ||||
-rw-r--r-- | etc/udev/debian/95-late.rules | 18 | ||||
-rw-r--r-- | etc/udev/debian/compat.rules | 37 | ||||
-rw-r--r-- | etc/udev/debian/devfs.rules | 154 | ||||
-rw-r--r-- | etc/udev/debian/persistent-net-generator.rules | 48 | ||||
-rw-r--r-- | etc/udev/debian/persistent.rules | 107 | ||||
-rw-r--r-- | etc/udev/debian/run.rules | 14 |
15 files changed, 330 insertions, 422 deletions
diff --git a/etc/udev/debian/udev.rules b/etc/udev/debian/50-udev.rules index af16c17f48..e3a10701cf 100644 --- a/etc/udev/debian/udev.rules +++ b/etc/udev/debian/50-udev.rules @@ -1,25 +1,20 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -# workaround for devices which do not report media changes -SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \ - ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" -SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \ - OPTIONS+="all_partitions" +# import the properties of optical drives +KERNEL=="hd[a-z]|pcd[0-9]*", ACTION=="add|change", DRIVERS=="ide-cdrom|pcd", \ + IMPORT{program}="cdrom_id --export $tempnode" +KERNEL=="sr[0-9]*", ACTION=="add|change", \ + IMPORT{program}="cdrom_id --export $tempnode" + +# workarounds for devices which do not report media changes +SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \ + ATTRS{model}=="IOMEGA_ZIP*|ZIP *", OPTIONS+="all_partitions" +SUBSYSTEMS=="scsi", KERNEL=="sd[a-z]", ATTR{removable}=="1", \ + ATTRS{model}=="IOMEGA_ZIP*|ZIP *", OPTIONS+="all_partitions" +SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", \ + ATTRS{media}=="floppy", OPTIONS+="all_partitions" # SCSI devices -SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" +SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" +SUBSYSTEM=="bsg", NAME="bsg/%k" # USB devices SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" @@ -28,13 +23,15 @@ SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k" SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k" SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" +SUBSYSTEMS=="usb", KERNEL=="iowarrior[0-9]*", NAME="usb/%k" SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ - ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \ - SYMLINK+="pilot" + ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*|[Pp]alm*Handheld*", \ + SYMLINK+="pilot" # usbfs-like devices -SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ - NAME="%c" +SUBSYSTEM=="usb_device", ACTION=="add", \ + PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ + NAME="$result" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" # serial devices @@ -43,13 +40,14 @@ KERNEL=="capi[0-9]*", NAME="capi/%n" # video devices KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \ - NAME="%c" + NAME="$result" KERNEL=="card[0-9]*", NAME="dri/%k" # misc devices KERNEL=="hw_random", NAME="hwrng" KERNEL=="tun", NAME="net/%k" KERNEL=="evtchn", NAME="xen/%k" +KERNEL=="rtc0", SYMLINK+="rtc" KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" @@ -63,7 +61,7 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" KERNEL=="uverbs*", NAME="infiniband/%k" KERNEL=="ucm*", NAME="infiniband/%k" -KERNEL=="rdma_ucm", NAME="infiniband/%k" +KERNEL=="rdma_cm", NAME="infiniband/%k" # ALSA devices KERNEL=="controlC[0-9]*", NAME="snd/%k" @@ -73,7 +71,7 @@ KERNEL=="midiC[D0-9]*", NAME="snd/%k" KERNEL=="timer", NAME="snd/%k" KERNEL=="seq", NAME="snd/%k" -# ieee1394 devices +# ieee1394 devices KERNEL=="dv1394*", NAME="dv1394/%n" KERNEL=="video1394*", NAME="video1394/%n" @@ -87,17 +85,14 @@ KERNEL=="uinput", NAME="input/%k" # Zaptel KERNEL=="zapctl", NAME="zap/ctl" -KERNEL=="zaptimer", NAME="zap/timer" KERNEL=="zapchannel", NAME="zap/channel" KERNEL=="zappseudo", NAME="zap/pseudo" +KERNEL=="zaptimer", NAME="zap/timer" +KERNEL=="transcode", NAME="zap/transcode" KERNEL=="zap[0-9]*", NAME="zap/%n" # AOE character devices -SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" -SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" -SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" -SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k" +SUBSYSTEM=="aoe", NAME="etherd/%k" -# device mapper creates its own device nodes, so ignore these KERNEL=="device-mapper", NAME="mapper/control" diff --git a/etc/udev/debian/persistent-input.rules b/etc/udev/debian/60-persistent-input.rules index 47c4ae98cb..8f49d250b1 100644 --- a/etc/udev/debian/persistent-input.rules +++ b/etc/udev/debian/60-persistent-input.rules @@ -1,5 +1,5 @@ SUBSYSTEM!="input", GOTO="persistent_input_end" -ACTION!="add", GOTO="persistent_input_end" +ACTION!="add|change", GOTO="persistent_input_end" # ignore the mid-level drivers KERNEL=="input[0-9]*", GOTO="persistent_input_end" @@ -22,7 +22,7 @@ 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" +ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" # by-id links, generic and for the event devices KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ @@ -31,7 +31,7 @@ KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \ SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" # by-path links -IMPORT{program}="path_id %p" +IMPORT{program}="path_id $devpath" KERNEL=="mouse*|js*", ENV{ID_PATH}=="?*", \ SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" KERNEL=="event*", ENV{ID_PATH}=="?*", \ diff --git a/etc/udev/debian/60-persistent-storage-tape.rules b/etc/udev/debian/60-persistent-storage-tape.rules new file mode 100644 index 0000000000..6d2f5f14e9 --- /dev/null +++ b/etc/udev/debian/60-persistent-storage-tape.rules @@ -0,0 +1,42 @@ +# This file contains the rules needed to create persistent device names. + +# we are only interested in add and change actions for block devices +ACTION!="add|change", GOTO="persistent_storage_tape_end" + +# "Medium Changers" +KERNEL=="sg[0-9]*", \ + SUBSYSTEMS=="scsi", ATTRS{type}=="8", \ + IMPORT{program}="scsi_id --export --whitelisted --device=$tempnode" + +KERNEL=="sg[0-9]*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" + +SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" + +KERNEL=="st*[0-9]", ATTRS{ieee1394_id}=="?*", \ + ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}" +KERNEL=="st*[0-9]", ENV{ID_SERIAL}!="?*", \ + SUBSYSTEMS=="usb", \ + IMPORT{program}="usb_id --export $devpath" + +KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", \ + SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", \ + ENV{BSG_DEV}="$root/bsg/$id" +KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", \ + WAIT_FOR="$env{BSG_DEV}", \ + ENV{ID_BUS}="scsi", \ + IMPORT{program}="scsi_id --export --device=$env{BSG_DEV}" + +KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" + +KERNEL=="st*[0-9]", \ + IMPORT{program}="path_id $devpath" +KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", \ + SYMLINK+="tape/by-path/$env{ID_PATH}" + +# end of processing +LABEL="persistent_storage_tape_end" + diff --git a/etc/udev/debian/60-persistent-storage.rules b/etc/udev/debian/60-persistent-storage.rules new file mode 100644 index 0000000000..65e7204531 --- /dev/null +++ b/etc/udev/debian/60-persistent-storage.rules @@ -0,0 +1,109 @@ +# This file contains the rules needed to create persistent device names. + +# forward scsi device events to the corresponding block device +ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", \ + TEST=="block", ATTR{block/*/uevent}="change" + +# we are only interested in add and change actions for block devices +ACTION!="add|change", GOTO="persistent_storage_end" +SUBSYSTEM!="block", GOTO="persistent_storage_end" + +# and we can safely ignore these kinds of devices +KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" + +# skip removable ide devices, because open(2) on them causes an events loop +KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \ + GOTO="persistent_storage_end" +KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \ + GOTO="persistent_storage_end" + +# ignore partitions that span the entire disk +TEST=="whole_disk", GOTO="persistent_storage_end" + +# skip xen virtual hard disks +DRIVERS=="vbd", GOTO="no_hardware_id" + +# check these attributes of /sys/class/block nodes +ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk" +ENV{DEVTYPE}!="?*", ATTR{start}=="?*", ENV{DEVTYPE}="partition" + +# look for different kinds of unique identificators +KERNEL=="hd*[!0-9]", \ + IMPORT{program}="ata_id --export $tempnode" + +KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", \ + ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}" +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", \ + SUBSYSTEMS=="usb", \ + IMPORT{program}="usb_id --export $devpath" +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", \ + ENV{ID_BUS}="scsi", \ + IMPORT{program}="scsi_id --export --whitelisted --device=$tempnode" +KERNEL=="cciss?c[0-9]d[0-9]*", ENV{ID_SERIAL}!="?*", \ + ENV{ID_BUS}="cciss", \ + IMPORT{program}="scsi_id --export --whitelisted --device=$tempnode" + +KERNEL=="dasd*[!0-9]", \ + IMPORT{program}="dasd_id --export $tempnode" + +KERNEL=="sd*[!0-9]|hd*[!0-9]", \ + IMPORT{program}="edd_id --export $tempnode" + +KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", \ + PROGRAM="ata_id $tempnode", RESULT=="?*", ENV{ID_ATA_COMPAT}="$result" + +# find the physical path of the device +ENV{DEVTYPE}=="disk", IMPORT{program}="path_id $devpath" + +LABEL="no_hardware_id" + +# import the variables of partitions from the parent disks +ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" + +# obsolete PATA driver +KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" +KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" +# hd*-like compatibility links for libata and PATA devices +KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", \ + SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}" +KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", \ + SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n" + +KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \ + ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \ + SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" +KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \ + ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \ + SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" + +ENV{DEVTYPE}=="disk", ENV{ID_EDD}=="?*", \ + SYMLINK+="disk/by-id/edd-$env{ID_EDD}" +ENV{DEVTYPE}=="partition", ENV{ID_EDD}=="?*", \ + SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n" + +KERNEL=="sd*[!0-9]|sr*|dasd[!0-9]*|cciss?c[0-9]d[0-9]*", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +KERNEL=="sd*[0-9]|dasd*[0-9]|cciss*p[0-9]*", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", \ + SYMLINK+="disk/by-path/$env{ID_PATH}" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", \ + SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" + +# skip unpartitioned removable media devices from drivers which do not send +# "change" events +ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", \ + GOTO="persistent_storage_end" + +# UUID and volume label +IMPORT{program}="vol_id --export $tempnode" +ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ + SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" +ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ + SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + +LABEL="persistent_storage_end" + diff --git a/etc/udev/debian/60-persistent-v4l.rules b/etc/udev/debian/60-persistent-v4l.rules new file mode 100644 index 0000000000..5a317b6c18 --- /dev/null +++ b/etc/udev/debian/60-persistent-v4l.rules @@ -0,0 +1,17 @@ +ACTION!="add|change", GOTO="persistent_v4l_end" +SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" + +# ignore devices without a valid "index" number +TEST!="index", GOTO="persistent_v4l_end" +ATTR{index}!="?*", GOTO="persistent_v4l_end" + +IMPORT{program}="path_id $devpath" + +KERNEL=="video*|vbi*", ENV{ID_PATH}=="?*", \ + SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}" + +KERNEL=="audio*", ENV{ID_PATH}=="?*", \ + SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}" + +LABEL="persistent_v4l_end" + diff --git a/etc/udev/debian/cd-aliases-generator.rules b/etc/udev/debian/75-cd-aliases-generator.rules index f65548816e..6b178a0ae7 100644 --- a/etc/udev/debian/cd-aliases-generator.rules +++ b/etc/udev/debian/75-cd-aliases-generator.rules @@ -1,13 +1,11 @@ # These rules generate rules for the /dev/{cdrom,dvd,...} symlinks and -# write them to /etc/udev/rules.d/z20_persistent-cd.rules. -# -# The default name for this file is z75_cd-aliases-generator.rules. +# write them to /etc/udev/rules.d/70-persistent-cd.rules. ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ SUBSYSTEMS!="usb|ieee1394", \ - PROGRAM="write_cd_rules", SYMLINK+="%c" + PROGRAM="write_cd_rules", SYMLINK+="$result" ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \ SUBSYSTEMS=="usb|ieee1394", \ - PROGRAM="write_cd_rules by-id", SYMLINK+="%c" + PROGRAM="write_cd_rules by-id", SYMLINK+="$result" diff --git a/etc/udev/debian/75-persistent-net-generator.rules b/etc/udev/debian/75-persistent-net-generator.rules new file mode 100644 index 0000000000..e8d3b888e0 --- /dev/null +++ b/etc/udev/debian/75-persistent-net-generator.rules @@ -0,0 +1,86 @@ +# These rules generate rules to keep network interface names unchanged +# across reboots write them to /etc/udev/rules.d/70-persistent-net.rules. + +# variables used to communicate: +# MATCHADDR MAC address used for the match +# MATCHID bus_id used for the match +# MATCHDRV driver name used for the match +# MATCHIFTYPE interface type match +# COMMENT comment to add to the generated rule +# INTERFACE_NAME requested name supplied by external tool +# INTERFACE_NEW new interface name returned by rule writer + +ACTION!="add", GOTO="persistent_net_generator_end" +SUBSYSTEM!="net", GOTO="persistent_net_generator_end" + +# ignore the interface if a name has already been set +NAME=="?*", GOTO="persistent_net_generator_end" + +# ignore interfaces without a driver link like bridges and VLANs +DRIVERS!="?*", GOTO="persistent_net_generator_end" + +# device name whitelist +KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \ + GOTO="persistent_net_generator_end" + +# ignore Xen virtual interfaces +SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" + +# ignore UML virtual interfaces +DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end" + +# ignore "secondary" raw interfaces of the madwifi driver +KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" + +# ignore "secondary" monitor interfaces of mac80211 drivers +KERNEL=="wlan*", ATTRS{type}=="803", GOTO="persistent_net_generator_end" + +# by default match on the MAC address and interface type +ENV{MATCHADDR}="$attr{address}" +ENV{MATCHIFTYPE}="$attr{type}" + +# ignore interfaces with locally administered or null MAC addresses +# and VMWare virtual interfaces +ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" +ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" +ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", ENV{MATCHADDR}="" + +# ibmveth interfaces have stable locally administered MAC addresses +SUBSYSTEMS=="ibmveth", ENV{MATCHADDR}="$attr{address}" + +# S/390 interfaces are matched only by id +SUBSYSTEMS=="ccwgroup", \ + ENV{MATCHDRV}="$driver", ENV{MATCHID}="$id", ENV{MATCHADDR}="" + +# terminate processing if there are not enough conditions to create a rule +ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", \ + GOTO="persistent_net_generator_end" + + +# provide nice comments for the generated rules +SUBSYSTEMS=="pci", \ + ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" +SUBSYSTEMS=="pcmcia", \ + ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id}" +SUBSYSTEMS=="usb", \ + ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct}" +SUBSYSTEMS=="ccwgroup", \ + ENV{COMMENT}="S/390 device at $id" +SUBSYSTEMS=="ibmveth", \ + ENV{COMMENT}="LPAR virtual device at $id" +SUBSYSTEMS=="ieee1394", \ + ENV{COMMENT}="Firewire device $attr{host_id}" +ENV{COMMENT}=="", \ + ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" +ATTRS{driver}=="?*", \ + ENV{COMMENT}="$env{COMMENT} ($attr{driver})" + + +# generate and write the rule +IMPORT{program}="write_net_rules" + +# rename the interface if requested +ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" + +LABEL="persistent_net_generator_end" + diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/80-drivers.rules index 662e997c81..edfcfa5394 100644 --- a/etc/udev/debian/hotplug.rules +++ b/etc/udev/debian/80-drivers.rules @@ -3,25 +3,27 @@ ACTION!="add", GOTO="hotplug_not_add_event" # check if the device has already been claimed by a driver ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded" -# this driver is broken and should not be loaded automatically (see #398962) +# this driver is broken and should not be loaded automatically on kernels +# < 2.6.21 (see #398962) SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded" # load the drivers ENV{MODALIAS}=="?*", \ RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}" -SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent" SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \ - RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'" + RUN+="/bin/sh -c '/sbin/modprobe --use-blacklist --all $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia" # rules for subsystems which lack proper hotplug support SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" +SUBSYSTEM=="memstick", RUN+="/sbin/modprobe --all ms_block mspro_block" SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe tifm_sd" SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe tifm_ms" +# needed for kernels < 2.6.22 SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \ ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*" @@ -31,7 +33,9 @@ SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \ ATTRS{vendor}!="Onstream" SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod" SUBSYSTEM=="scsi_device", ATTRS{type}=="8", RUN+="/sbin/modprobe ch" -SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", RUN+="/sbin/modprobe sg" + +SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", TEST!="[module/sg]", \ + RUN+="/sbin/modprobe sg" SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/91-permissions.rules index 205b733292..5182a4bd28 100644 --- a/etc/udev/debian/permissions.rules +++ b/etc/udev/debian/91-permissions.rules @@ -1,14 +1,5 @@ ACTION!="add", GOTO="permissions_end" -# workarounds needed to synchronize with sysfs -# only needed for kernels < v2.6.18-rc1 -ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" -# only needed for kernels < 2.6.16 -SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -# only needed for kernels < 2.6.17 -SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" - # devices needed to load the drivers providing them KERNEL=="tun", OPTIONS+="ignore_remove" KERNEL=="ppp", OPTIONS+="ignore_remove" @@ -22,15 +13,14 @@ SUBSYSTEM=="block", ATTRS{removable}=="1", \ # all block devices on these buses are "removable" SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy" +KERNEL=="cbm", GROUP="floppy" + # IDE devices -KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \ - IMPORT{program}="cdrom_id --export $tempnode" ENV{ID_CDROM}=="?*", GROUP="cdrom" KERNEL=="ht[0-9]*", GROUP="tape" KERNEL=="nht[0-9]*", GROUP="tape" # SCSI devices -KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" @@ -45,6 +35,7 @@ KERNEL=="legousbtower*", MODE="0666" KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" # usbfs-like devices +SUBSYSTEM=="usb_device", MODE="0664" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ MODE="0664" @@ -83,7 +74,6 @@ KERNEL=="full", MODE="0666" KERNEL=="null", MODE="0666" KERNEL=="zero", MODE="0666" KERNEL=="inotify", MODE="0666" -KERNEL=="sgi_fetchop", MODE="0666" KERNEL=="sonypi", MODE="0666" KERNEL=="agpgart", GROUP="video" KERNEL=="nvram", GROUP="nvram" @@ -92,7 +82,7 @@ KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" KERNEL=="fuse", GROUP="fuse" KERNEL=="kqemu", MODE="0666" KERNEL=="kvm", GROUP="kvm" -KERNEL=="tun", MODE="0666", +KERNEL=="tun", MODE="0666" KERNEL=="cdemu[0-9]*", GROUP="cdrom" KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" @@ -100,7 +90,7 @@ KERNEL=="pktcdvd", MODE="0644" KERNEL=="uverbs*", GROUP="rdma" KERNEL=="ucm*", GROUP="rdma" -KERNEL=="rdma_ucm", GROUP="rdma" +KERNEL=="rdma_cm", GROUP="rdma" # printers and parallel devices SUBSYSTEM=="printer", GROUP="lp" @@ -112,7 +102,7 @@ KERNEL=="pht[0-9]*", GROUP="tape" # sound devices SUBSYSTEM=="sound", GROUP="audio" -# ieee1394 devices +# ieee1394 devices KERNEL=="raw1394", GROUP="disk" KERNEL=="dv1394*", GROUP="video" KERNEL=="video1394*", GROUP="video" @@ -121,11 +111,20 @@ KERNEL=="video1394*", GROUP="video" KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \ MODE="0664", GROUP="video" KERNEL=="js[0-9]*", MODE="0664" +KERNEL=="event[0-9]*", ENV{ID_CLASS}=="joystick", \ + MODE="0664", GROUP="audio" KERNEL=="lirc[0-9]*", GROUP="video" +KERNEL=="sgi_*", MODE="0666" +KERNEL=="z90crypt", MODE="0666" +KERNEL=="iseries/ibmsis*", GROUP="disk" +KERNEL=="iseries/nvt*", GROUP="disk" +KERNEL=="iseries/vt*", GROUP="disk" +KERNEL=="iseries/vtty*", GROUP="dialout" + # AOE character devices SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" -SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" +SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440", GROUP="disk" LABEL="permissions_end" diff --git a/etc/udev/debian/95-late.rules b/etc/udev/debian/95-late.rules new file mode 100644 index 0000000000..622e019ef3 --- /dev/null +++ b/etc/udev/debian/95-late.rules @@ -0,0 +1,18 @@ +# run a command on remove events +ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" + +# ignore the events generated by virtual consoles +KERNEL=="ptmx", OPTIONS+="last_rule" +KERNEL=="console", OPTIONS+="last_rule" +KERNEL=="tty" , OPTIONS+="last_rule" +KERNEL=="tty[0-9]*", OPTIONS+="last_rule" +KERNEL=="pty*", OPTIONS+="last_rule" +SUBSYSTEM=="vc", OPTIONS+="last_rule" + +# do not delete static device nodes +ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", \ + OPTIONS+="ignore_remove" + +# debugging monitor +RUN+="socket:/org/kernel/udev/monitor" + diff --git a/etc/udev/debian/compat.rules b/etc/udev/debian/compat.rules deleted file mode 100644 index 209e3ce7e4..0000000000 --- a/etc/udev/debian/compat.rules +++ /dev/null @@ -1,37 +0,0 @@ -# compatibility links for a devfs-style /dev - -KERNEL=="md[0-9]*", SYMLINK+="%k" -#KERNEL=="loop[0-9]*", SYMLINK+="%k" - -#KERNEL=="tty[0-9]*", SYMLINK+="%k" -#KERNEL=="ttyS[0-9]*", SYMLINK+="%k" -#KERNEL=="ttyUSB[0-9]*", SYMLINK+="%k" - -#KERNEL=="vcs", SYMLINK+="%k" -#KERNEL=="vcs[0-9]*", SYMLINK+="%k" -#KERNEL=="vcsa", SYMLINK+="%k" -#KERNEL=="vcsa[0-9]*", SYMLINK+="%k" - -KERNEL=="video*", SYMLINK+="%k" -KERNEL=="radio*", SYMLINK+="%k" -KERNEL=="vbi*", SYMLINK+="%k" -KERNEL=="vtx*", SYMLINK+="%k" - -KERNEL=="apm_bios", SYMLINK+="%k" -KERNEL=="agpgart", SYMLINK+="%k" -#KERNEL=="psaux", SYMLINK+="%k" -#KERNEL=="nvram", SYMLINK+="%k" -KERNEL=="rtc", SYMLINK+="%k" -#KERNEL=="ram[0-9]*", SYMLINK+="%k" - -#KERNEL=="i2c-[0-9]*", SYMLINK+="%k" -#KERNEL=="lp[0-9]*", SYMLINK+="%k" - -KERNEL=="audio*", SYMLINK+="%k" -KERNEL=="dsp*", SYMLINK+="%k" -KERNEL=="mixer*", SYMLINK+="%k" - -#KERNEL=="fb[0-9]*", SYMLINK+="%k" -#KERNEL=="fd[0-9]*", SYMLINK+="%k" -#KERNEL=="js[0-9]*", SYMLINK+="%k" - diff --git a/etc/udev/debian/devfs.rules b/etc/udev/debian/devfs.rules deleted file mode 100644 index 56ed1a8807..0000000000 --- a/etc/udev/debian/devfs.rules +++ /dev/null @@ -1,154 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -# workaround for devices which do not report media changes -SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \ - ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" -SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \ - OPTIONS+="all_partitions" - -# IDE devices -SUBSYSTEMS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \ - ACTION=="add", \ - NAME="%c{1}", SYMLINK+="%k %c{2}" - -# SCSI devices -SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", ACTION=="add", \ - NAME="%c{1}", SYMLINK+="%k %c{2}" - -# RAID controllers -KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", ACTION=="add", \ - NAME="%c{1}", SYMLINK+="%k" - -# other block devices -KERNEL=="md[0-9]*", NAME="md/%n", -KERNEL=="loop[0-9]*", NAME="loop/%n" -KERNEL=="ram[0-9]*", NAME="rd/%n" - -# USB devices -SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ - ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \ - SYMLINK+="pilot" - -# usbfs-like devices -SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ - NAME="%c" -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" - -# serial devices -KERNEL=="ttyS[0-9]*", NAME="tts/%n" -KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n" -KERNEL=="rfcomm[0-9]*", NAME="bluetooth/rfcomm/%n", -KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" -KERNEL=="capi[0-9]*", NAME="capi/%n" - -# vc devices -KERNEL=="tty[0-9]*", NAME="vc/%n" -KERNEL=="vcs", NAME="vcc/0" -KERNEL=="vcs[0-9]*", NAME="vcc/%n" -KERNEL=="vcsa", NAME="vcc/a0" -KERNEL=="vcsa[0-9]*", NAME="vcc/a%n" - -# video devices -KERNEL=="video[0-9]*", NAME="v4l/%k" -KERNEL=="radio[0-9]*", NAME="v4l/%k" -KERNEL=="vbi[0-9]*", NAME="v4l/%k" -KERNEL=="vtx[0-9]*", NAME="v4l/%k" -KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \ - NAME="%c" -KERNEL=="fb[0-9]*", NAME="fb/%n" -KERNEL=="card[0-9]*", NAME="dri/%k" - -# misc devices -KERNEL=="apm_bios", NAME="misc/%k", -KERNEL=="agpgart", NAME="misc/%k" -KERNEL=="hw_random", NAME="hwrng" -KERNEL=="nvram", NAME="misc/%k" -KERNEL=="psaux", NAME="misc/%k" -KERNEL=="rtc", NAME="misc/%k" -KERNEL=="tun", NAME="net/%k" -KERNEL=="evtchn", NAME="xen/%k" - -# printers and parallel devices -KERNEL=="lp[0-9]*", NAME="printers/%n" -KERNEL=="parport[0-9]*", NAME="parports/%n" - -KERNEL=="i2c-[0-9]*", NAME="i2c/%n" -KERNEL=="fd[0-9]*", NAME="floppy/%n" - -KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" -KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" -KERNEL=="pktcdvd", NAME="pktcdvd/control" - -KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" -KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -KERNEL=="microcode", NAME="cpu/microcode" - -KERNEL=="umad*", NAME="infiniband/%k" -KERNEL=="issm*", NAME="infiniband/%k" -KERNEL=="uverbs*", NAME="infiniband/%k" -KERNEL=="ucm*", NAME="infiniband/%k" -KERNEL=="rdma_ucm", NAME="infiniband/%k" - -# sound devices -KERNEL=="controlC[0-9]*", NAME="snd/%k" -KERNEL=="hwC[D0-9]*", NAME="snd/%k" -KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" -KERNEL=="midiC[D0-9]*", NAME="snd/%k" -KERNEL=="timer", NAME="snd/%k" -KERNEL=="seq", NAME="snd/%k" -KERNEL=="audio*", NAME="sound/%k" -KERNEL=="dsp*", NAME="sound/%k" -KERNEL=="adsp*", NAME="sound/%k" -KERNEL=="midi*", NAME="sound/%k" -KERNEL=="mixer*", NAME="sound/%k" -KERNEL=="sequencer*", NAME="sound/%k" -KERNEL=="amidi*", NAME="sound/%k" -KERNEL=="dmmidi*", NAME="sound/%k" -KERNEL=="admmidi*", NAME="sound/%k" - -# ieee1394 devices -KERNEL=="dv1394*", NAME="dv1394/%n" -KERNEL=="video1394*", NAME="video1394/%n" - -# input devices -KERNEL=="mice", NAME="input/%k" -KERNEL=="mouse[0-9]*", NAME="input/%k" -KERNEL=="event[0-9]*", NAME="input/%k" -KERNEL=="js[0-9]*", NAME="input/%k" -KERNEL=="ts[0-9]*", NAME="input/%k" -KERNEL=="uinput", NAME="input/%k" - -# Zaptel -KERNEL=="zapctl", NAME="zap/ctl" -KERNEL=="zaptimer", NAME="zap/timer" -KERNEL=="zapchannel", NAME="zap/channel" -KERNEL=="zappseudo", NAME="zap/pseudo" -KERNEL=="zap[0-9]*", NAME="zap/%n" - -# AOE character devices -SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" -SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" -SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" -SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k" - -# device mapper creates its own device nodes, so ignore these -KERNEL=="device-mapper", NAME="mapper/control" - diff --git a/etc/udev/debian/persistent-net-generator.rules b/etc/udev/debian/persistent-net-generator.rules deleted file mode 100644 index 6df00bff2f..0000000000 --- a/etc/udev/debian/persistent-net-generator.rules +++ /dev/null @@ -1,48 +0,0 @@ -# These rules generate rules to keep network interface names unchanged -# across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules. -# -# The default name for this file is z45_persistent-net-generator.rules. - -ACTION!="add", GOTO="persistent_net_generator_end" -SUBSYSTEM!="net", GOTO="persistent_net_generator_end" - -# ignore the interface if a name has already been set -NAME=="?*", GOTO="persistent_net_generator_end" - -# ignore Xen virtual interfaces -SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" - -# ignore UML virtual interfaces -DRIVERS=="uml-netdev", GOTO="persistent_net_generator_end" - -# ignore VMWare virtual interfaces -ATTR{address}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" - -# ignore interfaces with random MAC addresses -ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" - -# ignore "secondary" raw interfaces of the madwifi driver -KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" - -# provide nice comments for the generated rules -SUBSYSTEMS=="pci", \ - ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" -SUBSYSTEMS=="usb", \ - ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}" -SUBSYSTEMS=="ccwgroup", \ - ENV{COMMENT}="S/390 device at $id", -SUBSYSTEMS=="ieee1394", \ - ENV{COMMENT}="Firewire device $attr{host_id}" -ENV{COMMENT}=="", \ - ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" -ATTRS{driver}=="?*", \ - ENV{COMMENT}="$env{COMMENT} ($attr{driver})" - -# ignore interfaces without a driver link like bridges and VLANs -KERNEL=="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", DRIVERS=="?*",\ - IMPORT{program}="write_net_rules $attr{address}" - -ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" - -LABEL="persistent_net_generator_end" - diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules deleted file mode 100644 index de2fa2a928..0000000000 --- a/etc/udev/debian/persistent.rules +++ /dev/null @@ -1,107 +0,0 @@ -# This file contains the rules needed to create persistent device names. - -# we are only interested in add actions for block devices -ACTION!="add", GOTO="persistent_storage_end" -SUBSYSTEM!="block", GOTO="persistent_storage_end" - -# and we can safely ignore these kinds of devices -KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" - -# skip removable ide devices, because open(2) on them causes an events loop -KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \ - GOTO="persistent_storage_end" -KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \ - GOTO="persistent_storage_end" - -# ignore partitions that span the entire disk -ATTR{whole_disk}=="*", GOTO="persistent_storage_end" - -# skip xen virtual hard disks -DRIVERS=="vbd", GOTO="no_hardware_id" - -# look for different kinds of unique identificators -KERNEL=="hd*[!0-9]", \ - IMPORT{program}="ata_id --export $tempnode" - -KERNEL=="sd*[!0-9]|sr*|st*|nst*", ATTRS{ieee1394_id}=="?*", \ - ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}" -KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="usb_id -x" -KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" -KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode" -KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", - IMPORT{program}="scsi_id -g -x -n -s $devpath -d $tempnode" -KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode" -KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \ - IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode" - -KERNEL=="dasd*[!0-9]", \ - IMPORT{program}="dasd_id --export $tempnode" - -KERNEL=="*[!0-9]", \ - IMPORT{program}="edd_id --export $tempnode" - -# find the physical path of the device -KERNEL=="*[!0-9]|sr*|st*", IMPORT{program}="path_id $devpath" - -LABEL="no_hardware_id" - -# import the variables of partitions from the parent disks -KERNEL=="*[0-9]", IMPORT{parent}="ID_*" - -KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" -KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" -KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_VENDOR}=="ATA", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}" -KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_VENDOR}=="ATA", \ - SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n" - -KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \ - ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \ - SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" -KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \ - ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \ - SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" - -KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", \ - SYMLINK+="disk/by-id/edd-$env{ID_EDD}" -KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", \ - SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n" - -KERNEL=="sd*[!0-9]|dasd[!0-9]*|sr*", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" -KERNEL=="st*", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" -KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \ - SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - -KERNEL=="*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_PATH}=="?*", \ - SYMLINK+="disk/by-path/$env{ID_PATH}" -KERNEL=="*[0-9]|cciss*p[0-9]", ENV{ID_PATH}=="?*", \ - SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" -KERNEL=="st*", ENV{ID_PATH}=="?*", \ - SYMLINK+="tape/by-path/$env{ID_PATH}" -KERNEL=="sr*|st*", GOTO="persistent_storage_end" - -# UUID and volume label -KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" -IMPORT{program}="vol_id --export $tempnode" -ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ - SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ - SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - -# end of processing -LABEL="persistent_storage_end" - diff --git a/etc/udev/debian/run.rules b/etc/udev/debian/run.rules deleted file mode 100644 index 75d71375bb..0000000000 --- a/etc/udev/debian/run.rules +++ /dev/null @@ -1,14 +0,0 @@ -# debugging monitor -RUN+="socket:/org/kernel/udev/monitor" - -# run a command on remove events -ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" - -# ignore the events generated by virtual consoles -KERNEL=="ptmx", OPTIONS+="last_rule" -KERNEL=="console", OPTIONS+="last_rule" -KERNEL=="tty" , OPTIONS+="last_rule" -KERNEL=="tty[0-9]*", OPTIONS+="last_rule" -KERNEL=="pty*", OPTIONS+="last_rule" -SUBSYSTEM=="vc", OPTIONS+="last_rule" - |