Re: Proper way to restart network after modem/router reset
On Sun, Feb 13, 2011 at 8:20 PM, Bob Proulx <bob@proulx.com> wrote:
> Tom H wrote:
>> Joe Riel wrote:
>> >
>> > $ grep -v '^\#' /etc/network/interfaces
>> >
>> > auto lo
>> > iface lo inet loopback
>> > allow-hotplug eth0
>>
>> Your "/etc/network/interfaces" is incorrect.
>> If you're using NM, "allow-hotplug eth0" shouldn't be included.
>> If you're not using NM, "iface eth0 inet dhcp" should be added.
>
> Mostly agree except that I believe it is okay to have the auto and
> allow-hotplug lines only. And I think the configuration specifically
> is due to the action of Network Manager's postinst script. See this
> bug report for the details, especially comments related to #49 that I
> have linked to here.
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530024#49
>
> Since the above config showed to us removed all commented out lines we
> can't see if there is a line
> #NetworkManager#iface eth0 inet dhcp
> in there or not. I am thinking there is. And that left the lonely
> 'allow-hotplug eth0' line behind by itself.
Thanks. I hadn't noticed the grep; I must've assumed that it was a PS1
when I read (quickly) the original email. :)
I guess that it's good to know that NM only chokes on "iface ..."
stanzas when "managed=false". :)
To go back to the original query:
Since NM's managing the interfaces, it's "/etc/init.d/NetworkManager
restart" or "service NetworkManager restart" or "invoke-rc.d
NetworkManager restart" (I don't have a box with NM installed so
"NetworkManager"'s from memory; STUPID caps).
Reply to: