Networking :: How to Detect Lost Network Connection



Thanks - so in terms of a command in a script how do I turn dhcp on?
Juanito,
 You're right, looking closer at it /etc/init.d/networking will not usually help.  I saw an old forum post and pump seems to be the dhcp client that requests an address -- sudo pump -i eth0 -- .

HTH

Thanks - "sudo pump -i eth0" did the trick from the command line.

I've started a script running - let's see if the desktop can stay connected for a few days now...

After a couple of weeks testing, this got the job done:
Code Sample
#!/bin/bash
#
while [ 1 ]; do
sleep 60
if ! ping -c2 192.168.1.1 2>&1 | grep ttl; then
pump -i eth0
fi
done
#
#EOF

It seems that keeping the network connection is enough to keep cupsd, smbd, nmbd, etc, etc running.

Thanks for the help

OK, so running the above script from a terminal window once dsl has booted works fine.

However...running it from bootlocal.sh does not work fine as command is not passed back to bootlocal.sh so that the boot process can finish.

How do I pass the above script to run in the background from bootlocal.sh?

Next Page...
original here.