Re: NetworkManager-dispatcher killing my scripts



On Mon, 2013-07-29 at 09:35 -0600, Jeff Sadowski wrote:
I created a simple script to show my problem.
<-------start of /etc/NetworkManager/dispatcher.d/99-test script
test()
{
x=0
while [ ${x} -lt 25 ];do
sleep 1
echo ${x} > /tmp/test
let x=${x}+1
done
}
test &
<------end of script

the script gets killed after 8 seconds ie:
cat /tmp/test
8


I don't see any error messages in /var/log/message pertaining to it.

Is there a way to get my script to not get killed?
Maybe a way to externally call my script using dispatcher?

Scripts actually get 3 seconds to complete.  They aren't currently
expected to run for long, especially on network disconnection, because
the network is already gone.  You can run the dispatcher with debug mode
like:

/usr/libexec/nm-dispatcher.action --debug --persist

The daemon currently doesn't block waiting on scripts, but there have
been discussions to make it do so.  Which would make this problem even
more acute, since network changes could block on long-running scripts.

Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]