You are not logged in.
hi!
i use an udev-rule to run a backup script, if an external hard drive is connected to my laptop:
KERNEL=="sd?1", ATTRS{manufacturer}=="TrekStor", ATTRS{serial}=="343434", ACTION=="add", OPTIONS+="event_timeout=3600",SYMLINK+="external", RUN+="/path/to/script.sh"
the option event_timeout ensures that the script isn't killed after 60 seconds.
everthing used to work as expected. until recently. now i have lines like these in my log and the script is killed.
Mar 15 20:38:53 localhost udevd[157]: worker [14982] timeout, kill it
Mar 15 20:38:53 localhost udevd[157]: seq 2186 '/devices/pci0000:00/0000:00:1a.7/usb1/1-5/1-5.4/1-5.4.3/1-5.4.3.2/1-5.4.3.2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1' killed
Mar 15 20:38:53 localhost udevd[157]: worker [14982] terminated by signal 9 (Killed)
is this a known bug in udev? any workaround?
ccc1
Last edited by ccc1 (2013-08-11 14:29:38)
Offline
Offline
ccc1 wrote:i use an udev-rule to run a backup script
And that's your problem right there. You should not attempt to fork long running processes from a udev rule. What you're seeing is expected behavior.
ok.
what should i use instead? my backup script should start after the usb-drive is connected ...
ccc1
Offline