[Novalug] where to put commands to be executed at boot time
atporter at gmail.com
Sun Apr 12 12:11:23 EDT 2009
On Sun, Apr 12, 2009 at 8:55 AM, Nino Pereira <pereira at speakeasy.net> wrote:
> thanks for the suggestion, but it doesn't work. I put the commands
> in the file /etc/network/interfaces, behind the two other commands
> that were there already (auto lo, and iface lo inet loopback).
> On a reboot I don't connect to the internet automatically.
> Should I have put my fixed IP commands somewhere else?
> Before 'auto lo' etc.?
You'd want the full stanza:
auto eth0 # start eth0 automatically, if this is left out you can
still use ifup/ifdown by hand
iface eth0 inet static # tell the system that eth0 is a static IP, you
can also use "inet dhcp" here
address xx.xx.xx.xx # your IP
gateway xx.xx.xx.xx # default gw
You can also add options like "up" & "pre-up" or "down" if you need to
add/remove modules or run DynDNS clients, etc. This is all documented
pretty clearly in the man page: `man 5 interfaces`
More information about the Novalug