Re: restarting pump (DHCP) automatically when network unavailable at boot time



On Thu, 28 Jun 2007 22:47:09 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:

On a machine in a local network, I have in my /etc/network/interfaces
file:

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 <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator



Relevant Pages

  • Re: adding extra network routes
    ... > to add an extra route to a network without seeing the above errors ... Test $IFACE and exit the script appropriately. ... iface eth0 inet dhcp ...
    (Debian-User)
  • Re: virtual IP address - ssh problem
    ... iface eth0 inet dhcp ... I can contact the server via a terminal server. ... and the first IP is reachable via SSH again. ...
    (comp.os.linux.networking)
  • Re: IP Address Problems
    ... iface eth0 inet dhcp ... Since you said something about spoofing MAC ...
    (Ubuntu)
  • no internet connection (debian)
    ... I just did the same thing as I did with woody, ... iface eth0 inet dhcp ... nameserver 195.130.131.3 ...
    (alt.os.linux)
  • Re: dial-up to ethernet
    ... Kent West said: ... ifup would not work at all with ... iface eth0 inet dhcp ...
    (Debian-User)