60-persistent-serial.rules 947 B

1234567891011121314151617181920
  1. # do not edit this file, it will be overwritten on update
  2. ACTION=="remove", GOTO="persistent_serial_end"
  3. SUBSYSTEM!="tty", GOTO="persistent_serial_end"
  4. KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end"
  5. SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"
  6. IMPORT{builtin}="path_id"
  7. ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}"
  8. ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}"
  9. IMPORT{builtin}="usb_id"
  10. ENV{ID_SERIAL}=="", GOTO="persistent_serial_end"
  11. SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"
  12. ENV{ID_USB_INTERFACE_NUM}=="", GOTO="persistent_serial_end"
  13. ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"
  14. ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}"
  15. LABEL="persistent_serial_end"