summaryrefslogtreecommitdiff
path: root/rules.d/60-persistent-storage.rules.in
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #27169 from yuwata/udev-rule-refuse-unsafe-pathZbigniew Jędrzejewski-Szmek2023-04-111-1/+9
|\ | | | | sd-device,udev: refuse unsafe path in SYMLINK= and TAG=
| * rules: drop doubled spaceYu Watanabe2023-04-081-1/+1
| |
| * udev: restore compat symlink for nvme devicesZbigniew Jędrzejewski-Szmek2023-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5118e8e71dda211d20e34ec8d3012186ba27d3d3, the rules were changed to add OPTIONS="string_escape=replace" to creation of ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", so that "/" would be escaped. But this also changes how the symlink looks for devices that do not have "/". This adds back the old symlink for compat, except when a slash is present. In the meantime, we changed the symlink format to include ${ND_NSID}. Since the symlink with unescaped characters are older than that, for compat we only need to cover the older type. (Symlinks without escaping and with ${ND_NSID} were never created.) This makes it slightly easier on users: the non-deprecated symlinks are with "_${ND_NSID}", so they are easier to distinguish. Fixes #27155. Mostly untested :( I only have a boring nvme device with no special characters in the id, and the symlinks are unchanged for it by this patch.
* | udev/scsi_id: rename positional argumentsYu Watanabe2023-04-111-2/+2
|/
* rules: add whitespace after comma before the line continuationDmitry V. Levin2023-03-271-2/+2
|
* udev-rules: fix nvme symlink creation on namespace changesThomas Blume2023-03-211-0/+8
| | | | | | | | | | The nvme by-id symlink changes to the latest namespace when a new namespace gets added, for example by connecting multiple NVMe/TCP host controllers via nvme connect-all. That is incorrect for persistent device links. The persistent symbolic device link should continue to point to the same NVMe namespace throughout the lifetime of the current boot. Therefore the namespace id needs to be added to the link name.
* udev: add /dev/loop/ symlinksLennart Poettering2023-03-091-0/+11
| | | | | | | | | | | | | | | | | | | | This adds symlinks that allow accessing loopback block devices via stable names that reference their backing block devices, make the unpredictable naming of loopback devices less of an issue. Example: 1. Create a loopback block device for a file $F losetup --find $F 2. Reference the backing block device via its inode: L="$(stat -c '/dev/loop/by-inode/%Hd:%Ld-%i' $F)" fdisk $L In the above the loop device name (which might be /dev/loop47 or any other name) is not used at all.
* rules: do not use blkid builtin if built without blkid supportDmitry V. Levin2023-03-081-0/+144
When built without blkid, then udev-builtin-blkid is not built, and the verifier warns about the unknown builtin: 60-persistent-storage.rules:114 Unknown builtin command: blkid --hint=session_offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} 60-persistent-storage.rules:117 Unknown builtin command: blkid --noraid 60-persistent-storage.rules:120 Unknown builtin command: blkid 60-persistent-storage.rules: udev rules check failed