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
2

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.