插入加密狗后,使用udev重新加载蓝牙服务


2

我试图在其中创建文件/etc/udev/rules.d/97-bluetooth-input.rules:

KERNEL=="event*", SUBSYSTEM=="bluetooth", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.0/bluetooth/hci0", ACTION=="add", RUN+="/usr/bin/systemctl restart bluetooth.service"

我也尝试省略DEVPATH,但似乎无济于事。

更改后,我会sudo udevadm control -R拔下加密狗并将其重新插入,但蓝牙服务没有重新启动。

随着udevadm monitor -u我看到下面当我插上加密狗:

UDEV  [456580.937864] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3 (usb)
UDEV  [456580.942751] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.0 (usb)
UDEV  [456580.943739] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.1 (usb)
UDEV  [456580.945729] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.2 (usb)
UDEV  [456580.947046] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.3 (usb)
UDEV  [456580.948077] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.1 (usb)
UDEV  [456580.948187] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.0/bluetooth/hci0 (bluetooth)
UDEV  [456580.949265] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.2 (usb)
UDEV  [456580.950853] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.0/bluetooth/hci0/rfkill38 (rfkill)
UDEV  [456580.952866] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1.3:1.0 (usb)
UDEV  [456580.954560] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3 (usb)

我想念什么?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.