Udev rule with ACTION=="add" not being triggered when device is already connected at boot
Asked Answered
T

0

7

Here is my simple udev rule:

ACTION=="add",SUBSYSTEM=="usb",DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-13",RUN+="/opt/usb-libvirt-hotplug/usb-libvirt-hotplug.sh debian_testing" ACTION=="add",SUBSYSTEM=="usb",DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-14",RUN+="/opt/usb-libvirt-hotplug/usb-libvirt-hotplug.sh debian_testing"

This script called isn't mine, but it simply figures out the device bus and number of the usb device at that port and adds it to a libvirt guest xml.

The problem is this works fine when I physically insert something at ports 13 or 14, but when the PC boots and the usb devices are already inserted, these rules don't apply and the script doesn't get called.

How can I fix that?

Thank you in advance.

Taunton answered 2/1, 2018 at 22:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.