0

My udev rule points to a bash script with two commands. While the first command echo runs fine, the second line ifuse seems not to be executed.

$ cat /etc/udev/rules.d/test.rules

ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12a8/804", ENV{INTERFACE}=="255/253/1" RUN+="/bin/sh /home/user/test.sh"

$ cat /home/user/test.sh

#!/bin/sh
echo "Phone connected" >> /home/user/test.log
sleep 3
/usr/bin/ifuse /home/user/media/iOS

Remarks:

  • ifuse works if I execute the script manually: $ sh test.sh
  • Replacing the udev RUN+ statement with "/bin/su user -c /home/user/test.sh" doesn't help
  • Man page ifuse: https://www.mankier.com/1/ifuse
jjk
  • 411
  • 1
    https://unix.stackexchange.com/questions/497266/mount-fuse-mergerfs-in-udev-script / https://unix.stackexchange.com/a/507150/29483 – sourcejedi Nov 05 '19 at 18:53
  • Can you add the output of udevadm info --attribute-walk (device path) in your answer – programmer Nov 09 '19 at 21:40

0 Answers0