summaryrefslogtreecommitdiffstats
path: root/rules.d (follow)
Commit message (Collapse)AuthorAgeFilesLines
* udev: merge rules for bluetooth deviceYu Watanabe2020-09-151-2/+2
|
* udev: re-assign ID_NET_DRIVER=, ID_NET_LINK_FILE=, ID_NET_NAME= properties ↵Yu Watanabe2020-09-151-1/+1
| | | | | | | | | | | on non-'add' uevent Previous commit makes drop ID_NET_DRIVER=, ID_NET_LINK_FILE=, and ID_NET_NAME= properties for network interfaces on 'move' uevent. ID_NET_DRIVER= and ID_NET_LINK_FILE= properties are used by networkctl. ID_NET_NAME= may be used by end-user rules or programs. So, let's re-assign them on 'move' uevent. (Note that strictly speaking, this makes them re-assigned on all but 'remove' uevent.)
* rules: don't install 80-drivers.rules when kmod is disabledAlec Moskvin2020-08-251-1/+4
|
* udev: split attribute assignment for MMC cardsŁukasz Stelmach2020-06-251-2/+3
| | | | | | | | Some cards have names consisting only of whitespace characters which prevents the original rule from matching and assigning ID_SERIAL properly. With the split rules ID_SERIAL and ID_NAME are assigned independently and the symlink is created only if both are available the same way it has worked for partitions.
* rules: remove 61-autosuspend-manual.rulesZbigniew Jędrzejewski-Szmek2020-06-222-20/+0
| | | | | It doesn't hurt, but there's no point in keeping it now. Any changes can be added to 60-autosuspend.hwdb.
* tools: rewrite make-autosuspend-rules.py and add udev rulesZbigniew Jędrzejewski-Szmek2020-06-222-0/+15
| | | | | | | | | | | Concatenating strings is not a very efficient approach. And in this case fully unnecessary. We also need some rules to make use of those hwdb entries. PCI needs to be 8 characters, not 4. And we need to use uppercase hexadecimal for both. With udev rules this made no difference, but hwdb match is case sensitive. Fixes #16119.
* udev: do not execute hwdb builtin import twice or thriceZbigniew Jędrzejewski-Szmek2020-06-182-3/+5
| | | | | | | | | | Running the import more than once shouldn't matter, but it's a bit confusing and causes a slowdown too. This patch reworks the rules to avoid duplicted runs, but tries to keep the same imports. (E.g. import for pci devices without MODALIAS is only done for tty devices.) Note that this is only about hwdb import with argument, which uses MODALIAS as the lookup key. There are other imports done with different lookup keys.
* hwdb: generate a hwdb file instead of rules for autosuspendLennart Poettering2020-06-131-8/+0
|
* udev: rename the persistent link for ATA devicesLidong Zhong2020-05-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATA devices should use the ATA ids like port number and (possibly) master/slave or multiplier id, not the generic SCSI ID. Currently only port number is included in the link. With this patch the link would be able to support more cases, which are a) when the device is behind a port multiplexer b) the distinction between master and slave (distinguished by target id). I tried to verify scenario a) with this patch, but I failed to find a machine with PMP SATA devices attached. But the link below https://github.com/systemd/systemd/issues/3943 could show what's the difference. Here is my test for scenario b) Current version: linux-ql21:~ # ll /sys/class/block/sd[ab] lrwxrwxrwx 1 root root 0 May 8 20:46 /sys/class/block/sda -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:0/3:0:0:0/block/sda lrwxrwxrwx 1 root root 0 May 8 20:46 /sys/class/block/sdb -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:1/3:0:1:0/block/sdb linux-ql21:~ # ll /dev/disk/by-path/pci-0000\:00\:01.1-ata-1 lrwxrwxrwx 1 root root 9 May 8 20:44 /dev/disk/by-path/pci-0000:00:01.1-ata-1 -> ../../sdb linux-ql21:~ # udevadm info /sys/class/block/sda |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1 E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-path/pci-0000:00:01.1-ata-1 /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 linux-ql21:~ # udevadm info /sys/class/block/sdb |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1 E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-path/pci-0000:00:01.1-ata-1 After patch applied: linux-ql21:~ # ll /sys/class/block/sd[ab] lrwxrwxrwx 1 root root 0 May 8 21:07 /sys/class/block/sda -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:0/3:0:0:0/block/sda lrwxrwxrwx 1 root root 0 May 8 21:07 /sys/class/block/sdb -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:1/3:0:1:0/block/sdb linux-ql21:~ # ll /dev/disk/by-path/pci-0000\:00\:01.1-ata-* lrwxrwxrwx 1 root root 9 May 8 21:07 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 -> ../../sda lrwxrwxrwx 1 root root 9 May 8 21:07 /dev/disk/by-path/pci-0000:00:01.1-ata-1.1 -> ../../sdb linux-ql21:~ # udevadm info /sys/class/block/sda |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1.0 E: DEVLINKS=/dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/ata-VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 linux-ql21:~ # udevadm info /sys/class/block/sdb |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1.1 E: DEVLINKS=/dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/ata-VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-path/pci-0000:00:01.1-ata-1.1 Changelog: v5: add another parameter compat_link in handle_scsi() v4: comment for ID_PATH_ATA_COMPAT get string length with pointer difference (suggested by Franck Bui<fbui@suse.com>) v3: creating compatible link from env variables type change v2: remove udev rules modification for compatible link setup a test scenario of master/slave ATA devices v1: initial patch
* rules: automatically pull in smartcard.target from all CCID devicesLennart Poettering2020-05-211-0/+1
| | | | | | We apparently never matched the USB interface class. Let's fix that. Prompted by: #15676
* rules.d: import the keyboard builtin instead of running itPeter Hutterer2020-03-011-6/+8
| | | | | | | | | | | RUN seems to be used primarily for historical reasons over the more immediate IMPORT command. As a side-effect, RUN also runs *after* all the rules have been processed which is not really what we want here - we expect the device to be updated immediately. Other rules that rely on accurate evdev axes should be able to assume the axes are already present. So let's use IMPORT here. For consistency, the second two rules are split across multiple lines as well.
* udev: don't import parent ID_FS_ data on partitionsThomas Schmitt2020-01-091-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | When probing partitions, we inherit important information from the parent disk device such as ID_MODEL, and usage of such properties is seen to be acceptable and well established. However, we need to exclude filesystem information from the properties that get inherited. Information about the device content should not be passed on in this way. For example, Linux distro install media commonly uses an ISO filesystem plus a partition table. The ISO filesystem is detected on the main disk device, but we should not pass down those details to the partitions, some or all of which may be pointing at storage areas completely distinct from the ISO filesystem. This is particularly problematic when adding new partitions on media set up in this way (since the new partitions are then reported to contain the parent device's ISO filesystem), or when dealing with more unusual hybrid ISO layouts. The inaccuracy of information here inversely affects users of blkid and udev's persistent storage symlinks. Exclude ID_FS_* properties from the inheritance chain to avoid these problems. Fixes: #14408
* udev: mark all ccid/security devices with a special tagLennart Poettering2019-12-091-0/+6
| | | | | | | This adds a udev tag that is supposed to be attached to all devices that might potentially expose a PKCS#11 slot, i.e. CCID smartcards and similar. We can then use the appearance of devices of this type as trigger to rescan PKCS#11 slots.
* Rename udev's rules/ to rules.d/Zbigniew Jędrzejewski-Szmek2019-10-1026-0/+799
This change is only about the source tree. We have tmpfiles.d/, modprobe.d/, sysctl.d/, and sysusers.d/, but for historical reasons, rules/ didn't fit this pattern. We also *install* it as rules.d/. Let's rename to be consistent.