mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
udev: add safe guard for setting by-id symlink
The ID_BUS property is necessary for creating by-id symlinks. (cherry picked from commit5286da064c
) (cherry picked from commit46a301accd
)
This commit is contained in:
parent
2f4fdaaecc
commit
c61e4377d7
@ -17,6 +17,7 @@ IMPORT{builtin}="path_id"
|
||||
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}"
|
||||
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}"
|
||||
|
||||
ENV{ID_BUS}=="", GOTO="serial_end"
|
||||
ENV{ID_SERIAL}=="", GOTO="serial_end"
|
||||
ENV{ID_USB_INTERFACE_NUM}=="", GOTO="serial_end"
|
||||
ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"
|
||||
|
Loading…
Reference in New Issue
Block a user