For one or other reason it works this evening, but having another problem. when I run the following script myself, it works:I tried on my RPi 5: it successfully run with "=="
The file in /tmp contains:Code:
# cat /tmp/usb_handler.log Script usb_handler.sh is executed on 2024-05-16 13:39:48
Code:
#!/bin/bash# Path to LOGfilelog_file="/tmp/usb_handler.log"# Message to writetarget_dir=$(sudo lsblk -no MOUNTPOINT /dev/sda1)# Write message to logfileecho "$target_dir" >> "$log_file"
but when the same script is executed by the UDEV rule, the target_dir is EMPTY ???
Statistics: Posted by BramWerbrouck — Thu May 16, 2024 6:44 pm