You are not logged in.

#1 2007-09-15 12:31:31

Kei
Member
Registered: 2007-04-05
Posts: 88

[SOLVED] udev rules: cannot run command

I want to run a scipt everytime I plug in my external harddrive. I read the documentation and create a file called /etc/udev/rules.d/extern_hd.rules:

SUBSYSTEMS=="usb", SYSFS{serial}=="33504D315647585A", SYMLINK+="ExternHD", RUN+="/root/scripts/test.sh"

The symlink "ExternHD" gets created. The permissions of test.sh are rwxr-xr-x root root, but it never gets executed. What am I doing wrong?

Last edited by Kei (2007-09-18 11:30:35)

Offline

#2 2007-09-18 11:30:13

Kei
Member
Registered: 2007-04-05
Posts: 88

Re: [SOLVED] udev rules: cannot run command

Solution was easy... Udev doesn't want to start anything from within /root, so I put a hardlink to /usr/local/bin/ and now everything works fine.

Offline

Board footer

Powered by FluxBB