How to run long time process on Udev event?
- by neclude
(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