How to run long time process on Udev event?

Posted by neclude on Server Fault See other posts from Server Fault or by neclude
Published on 2012-11-20T09:51:34Z Indexed on 2012/11/20 11:07 UTC
Read the original article Hit count: 171

Filed under:
|
|

(sorry for my bad english)

I want run ppp connection when my usb modem is connect. so i use next udev rule:

ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="16d8",\
RUN+="/usr/local/bin/newPPP.sh $env{DEVNAME}"

(my modem appear in /dev as ttyACM0)

newPPP.sh:

#!/bin/bash
/usr/bin/pon prov $1 >/dev/null 2>&1 &

Problem:

udev event fire, newPPP.sh running, BUT newPPP.sh process will be killed after ~4-5s.
ppp not have time to connect. (in it params is timeout 10s for dial up).

How can i run long time process, that will not be killed?

(I was try nohup. It don't work too.)

System: Arch Linux

© Server Fault or respective owner

Related posts about linux

Related posts about udev