summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/42-usb-hid-pm.rules14
-rw-r--r--rules/50-firmware.rules3
-rw-r--r--rules/50-udev-default.rules51
-rw-r--r--rules/60-persistent-storage.rules2
-rw-r--r--rules/80-drivers.rules12
-rw-r--r--rules/80-net-name-slot.rules3
-rw-r--r--rules/Makefile.am8
7 files changed, 36 insertions, 57 deletions
diff --git a/rules/42-usb-hid-pm.rules b/rules/42-usb-hid-pm.rules
index c9f67c7a24..3fd6e8ab4c 100644
--- a/rules/42-usb-hid-pm.rules
+++ b/rules/42-usb-hid-pm.rules
@@ -1,24 +1,18 @@
+# do not edit this file, it will be overwritten on update
#
-# Enable autosuspend for qemu emulated usb hid devices.
-#
+# Enable autosuspend for qemu emulated usb hid devices
+
# Note that there are buggy qemu versions which advertise remote
# wakeup support but don't actually implement it correctly. This
# is the reason why we need a match for the serial number here.
# The serial number "42" is used to tag the implementations where
# remote wakeup is working.
-#
-
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
-# AMI 046b:ff10
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046b", ATTR{idProduct}=="ff10", TEST=="power/control", ATTR{power/control}="auto"
-
-#
# Catch-all for Avocent HID devices. Keyed off interface in order to only
# trigger on HID class devices.
-#
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0624", ATTR{bInterfaceClass}=="03", TEST=="../power/control", ATTR{../power/control}="auto"
# Dell DRAC 4
@@ -38,7 +32,7 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="14dd", ATTR{idProduct}=="0002"
# USB HID devices that are internal to the machine should also be safe to autosuspend
ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="removable", GOTO="usb_hid_pm_end"
-ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="unknown", GOTO="usb_hid_pm_end"
+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="unknown", GOTO="usb_hid_pm_end"
ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", ATTRS{removable}=="fixed", TEST=="../power/control", ATTR{../power/control}="auto"
diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
new file mode 100644
index 0000000000..f0ae684518
--- /dev/null
+++ b/rules/50-firmware.rules
@@ -0,0 +1,3 @@
+# do not edit this file, it will be overwritten on update
+
+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
index ecd79debfb..179065211a 100644
--- a/rules/50-udev-default.rules
+++ b/rules/50-udev-default.rules
@@ -1,52 +1,44 @@
# do not edit this file, it will be overwritten on update
+SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
+SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
+
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
+SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
+ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
+
+ACTION!="add", GOTO="default_permissions_end"
+
SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666"
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
-
-# serial
KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
-# virtio serial / console ports
-SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
+SUBSYSTEM=="rtc", ATTR{hctosys}=="1", MODE="0644"
-# mem
-SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
-# input
-SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0640"
SUBSYSTEM=="input", KERNEL=="ts[0-9]*|uinput", MODE="0640"
SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0644"
-# video4linux
SUBSYSTEM=="video4linux", GROUP="video"
-
-# graphics
SUBSYSTEM=="misc", KERNEL=="agpgart", GROUP="video"
SUBSYSTEM=="graphics", GROUP="video"
SUBSYSTEM=="drm", GROUP="video"
+SUBSYSTEM=="dvb", GROUP="video"
-# sound
SUBSYSTEM=="sound", GROUP="audio", \
OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer"
-# DVB (video)
-SUBSYSTEM=="dvb", GROUP="video"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
-# FireWire (firewire-core driver: IIDC devices, AV/C devices)
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video"
SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video"
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video"
-# 'libusb' device nodes
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
-
-# printer
KERNEL=="parport[0-9]*", GROUP="lp"
SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
SUBSYSTEM=="ppdev", GROUP="lp"
@@ -54,23 +46,15 @@ KERNEL=="lp[0-9]*", GROUP="lp"
KERNEL=="irlpt[0-9]*", GROUP="lp"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
-# block
SUBSYSTEM=="block", GROUP="disk"
-
-# floppy
SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
-
-# cdrom
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
KERNEL=="sch[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd", GROUP="cdrom"
-# tape
SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
-
-# block-related
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
KERNEL=="rawctl", GROUP="disk"
@@ -78,14 +62,9 @@ SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk"
SUBSYSTEM=="aoe", GROUP="disk", MODE="0220"
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
-# network
-KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
KERNEL=="rfkill", MODE="0644"
+KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
-KERNEL=="fuse", ACTION=="add", MODE="0666", OPTIONS+="static_node=fuse"
-
-SUBSYSTEM=="rtc", ATTR{hctosys}=="1", MODE="0644", SYMLINK+="rtc"
-
-SUBSYSTEM=="firmware", ACTION=="add", IMPORT{builtin}="firmware"
+KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
-ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
+LABEL="default_permissions_end"
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index b74821edd4..a4d009ae6e 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -26,8 +26,6 @@ ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}"
KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n"
-# ATA devices with their own "ata" kernel subsystem
-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="ata", IMPORT{program}="ata_id --export $devnode"
# ATA devices using the "scsi" subsystem
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $devnode"
# ATA/ATAPI devices (SPC-3 or later) using the "scsi" subsystem
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
index 3428cb28c9..50523e4333 100644
--- a/rules/80-drivers.rules
+++ b/rules/80-drivers.rules
@@ -2,12 +2,12 @@
ACTION=="remove", GOTO="drivers_end"
-DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
-KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", IMPORT{builtin}="kmod load sm_ftl"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", IMPORT{builtin}="kmod load tifm_sd"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", IMPORT{builtin}="kmod load tifm_ms"
-SUBSYSTEM=="memstick", IMPORT{builtin}="kmod load ms_block mspro_block"
-SUBSYSTEM=="i2o", IMPORT{builtin}="kmod load i2o_block"
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
+SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block"
SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev"
+KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl"
LABEL="drivers_end"
diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
index 2834e82dbf..15b5bc4107 100644
--- a/rules/80-net-name-slot.rules
+++ b/rules/80-net-name-slot.rules
@@ -4,6 +4,9 @@ ACTION=="remove", GOTO="net_name_slot_end"
SUBSYSTEM!="net", GOTO="net_name_slot_end"
NAME!="", GOTO="net_name_slot_end"
+IMPORT{cmdline}="net.ifnames"
+ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
+
NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
diff --git a/rules/Makefile.am b/rules/Makefile.am
index 319b7c59f6..dca563e815 100644
--- a/rules/Makefile.am
+++ b/rules/Makefile.am
@@ -2,16 +2,18 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
dist_udevrules_DATA = \
42-usb-hid-pm.rules \
+ 50-firmware.rules \
50-udev-default.rules \
60-cdrom_id.rules \
- 60-persistent-storage-tape.rules \
- 60-persistent-serial.rules \
- 60-persistent-input.rules \
60-persistent-alsa.rules \
+ 60-persistent-input.rules \
+ 60-persistent-serial.rules \
+ 60-persistent-storage-tape.rules \
60-persistent-v4l.rules \
61-accelerometer.rules \
64-btrfs.rules \
75-net-description.rules \
+ 75-persistent-net-generator.rules \
75-probe_mtd.rules \
75-tty-description.rules \
78-sound-card.rules \