Hallo zusammen
ich scheitere bei der durchführung meiner dev rule für meinen usb dongle. ich hätte gerne, das ein script ausgeführt wird, wenn dieser entfernt wird.
meine Datei:
/lib/udev/rules.d$ sudo nano 99-usb.rules
nach dem editieren:
sudo udevadm control --reload-rules && sudo udevadm trigger
der text in der rules datei:
ACTION=="remove", KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="bluetooth", ATTRS{idVendor}=="0a12", ATTRS{idProduct}=="0001", RUN+="/bin/bash /home/octoprint/Desktop/udev_regeln/test.sh"
warum wird das script nicht ausgeführt???? kann ich das irgendwie debugen? wenn ich die datei normal ausführe funktioniert es. testweise erstelle ich nur einen ordner
#!/usr/bin/env bash # Debugging test script called by udev mkdir /home/octoprint/Desktop/test
das zeigt udevadm monitor
KERNEL[6558.616454] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1/rfkill13 (rfkill) KERNEL[6558.616699] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1 (bluetooth) KERNEL[6558.616858] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) KERNEL[6558.617397] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) KERNEL[6558.617663] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) KERNEL[6558.617845] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) KERNEL[6558.618602] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 (usb) KERNEL[6558.618828] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 (usb) UDEV [6558.645959] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1/rfkill13 (rfkill) UDEV [6558.649766] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) UDEV [6558.651583] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1 (bluetooth) UDEV [6558.654635] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) UDEV [6558.662330] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) UDEV [6558.667330] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) UDEV [6558.676127] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 (usb) UDEV [6558.681080] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 (usb)
UDEV [6855.091212] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1/rfkill14 (rfkill) ACTION=remove DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1/rfkill14 SUBSYSTEM=rfkill RFKILL_NAME=hci1 RFKILL_TYPE=bluetooth RFKILL_STATE=1 RFKILL_HW_BLOCK_REASON=0x0 SEQNUM=4878 USEC_INITIALIZED=6714767110 SYSTEMD_RFKILL=1 ID_PATH=platform-5200000.usb-usb-0:1.3:1.0 ID_PATH_TAG=platform-5200000_usb-usb-0_1_3_1_0 UDEV [6855.094660] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) ACTION=unbind DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 SUBSYSTEM=usb DEVTYPE=usb_interface PRODUCT=a12/1/8891 TYPE=224/1/1 INTERFACE=224/1/1 SEQNUM=4880 USEC_INITIALIZED=6714747545 UDEV [6855.097425] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1 (bluetooth) ACTION=remove DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci1 SUBSYSTEM=bluetooth DEVTYPE=host SEQNUM=4879 USEC_INITIALIZED=6714751100 SYSTEMD_ALIAS=/sys/subsystem/bluetooth/devices/hci1 SYSTEMD_WANTS=bluetooth.target SYSTEMD_USER_WANTS=bluetooth.target TAGS=:systemd: CURRENT_TAGS=:systemd: UDEV [6855.099374] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) ACTION=remove DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.1 SUBSYSTEM=usb DEVTYPE=usb_interface PRODUCT=a12/1/8891 TYPE=224/1/1 INTERFACE=224/1/1 MODALIAS=usb:v0A12p0001d8891dcE0dsc01dp01icE0isc01ip01in01 SEQNUM=4883 USEC_INITIALIZED=6855085749 UDEV [6855.104348] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) ACTION=unbind DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 SUBSYSTEM=usb DEVTYPE=usb_interface PRODUCT=a12/1/8891 TYPE=224/1/1 INTERFACE=224/1/1 SEQNUM=4881 USEC_INITIALIZED=6714741579 UDEV [6855.109682] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) ACTION=remove DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3/1-1.3:1.0 SUBSYSTEM=usb DEVTYPE=usb_interface PRODUCT=a12/1/8891 TYPE=224/1/1 INTERFACE=224/1/1 MODALIAS=usb:v0A12p0001d8891dcE0dsc01dp01icE0isc01ip01in00 SEQNUM=4882 USEC_INITIALIZED=6855085407 UDEV [6855.116489] unbind /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 (usb) ACTION=unbind DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 SUBSYSTEM=usb DEVNAME=/dev/bus/usb/001/018 DEVTYPE=usb_device PRODUCT=a12/1/8891 TYPE=224/1/1 BUSNUM=001 DEVNUM=018 SEQNUM=4884 USEC_INITIALIZED=6714720334 MAJOR=189 MINOR=17 UDEV [6855.119983] remove /devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 (usb) ACTION=remove DEVPATH=/devices/platform/soc/5200000.usb/usb1/1-1/1-1.3 SUBSYSTEM=usb DEVNAME=/dev/bus/usb/001/018 DEVTYPE=usb_device PRODUCT=a12/1/8891 TYPE=224/1/1 BUSNUM=001 DEVNUM=018 SEQNUM=4885 USEC_INITIALIZED=6855086505 MAJOR=189 MINOR=17
danke