Re: restarting pump (DHCP) automatically when network unavailable at boot time
On Thu, 28 Jun 2007 22:47:09 +0200
Vincent Lefevre <firstname.lastname@example.org> wrote:
> On a machine in a local network, I have in my /etc/network/interfaces
> auto eth0
> iface eth0 inet dhcp
> But after a power outage, my machine sometimes restarts while the
> network isn't available yet. In this case, I can no longer ssh to
> it. And I can't reboot it remotely.
> How can I make pump (the DHCP client I'm using) to try again
> periodically? I think I can write a script that tests if pump
> is running (with the "ps" command) and can run this script by
> cron. But is there a better way?
I use dhclient (I know you said in a different message in this thread
that you don't like it), which by default does a bunch of
DHCPDISCOVERS, and if they all fail, it then goes to sleep (for 5
minutes by default), and then begins the process again when it wakes
up. This behavior seems to be exactly what you need; unfortunately, I
don't know anything about pump.
> Vincent Lefèvre <email@example.com> - Web: <http://www.vinc17.org/>
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator