Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 [2] 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to Detect Lost Network Connection, and write a script to fix it< Next Oldest | Next Newest >
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Feb. 22 2008,11:58 QUOTE

Thanks - so in terms of a command in a script how do I turn dhcp on?
Back to top
Profile PM 
Jason W Offline





Group: Members
Posts: 260
Joined: Nov. 2006
Posted: Feb. 22 2008,12:48 QUOTE

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
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Feb. 23 2008,09:49 QUOTE

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...
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Mar. 01 2008,10:12 QUOTE

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
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Mar. 26 2008,07:37 QUOTE

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?
Back to top
Profile PM 
11 replies since Feb. 17 2008,04:28 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 [2] 3 >/
reply to topic new topic new poll
Quick Reply: How to Detect Lost Network Connection

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code