]> git.ipfire.org Git - thirdparty/systemd.git/blame - rules/60-persistent-serial.rules
sysctl: always return the last error we encountered
[thirdparty/systemd.git] / rules / 60-persistent-serial.rules
CommitLineData
bc4c7518
KS
1# do not edit this file, it will be overwritten on update
2
4b06c409 3ACTION=="remove", GOTO="persistent_serial_end"
bc4c7518 4SUBSYSTEM!="tty", GOTO="persistent_serial_end"
65336f86 5KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end"
bc4c7518 6
edb0d9d8 7SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"
bc4c7518 8
d7867b31 9IMPORT{builtin}="path_id"
edb0d9d8
KS
10ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}"
11ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}"
bc4c7518 12
d7867b31 13IMPORT{builtin}="usb_id"
bc4c7518 14ENV{ID_SERIAL}=="", GOTO="persistent_serial_end"
edb0d9d8
KS
15SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"
16ENV{ID_USB_INTERFACE_NUM}=="", GOTO="persistent_serial_end"
17ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"
18ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}"
bc4c7518
KS
19
20LABEL="persistent_serial_end"