[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: boot hangs when no ethernet cable is plugged in



On Thu, Jul 9, 2015 at 8:39 AM, Vincent Lefevre <vincent@vinc17.net> wrote:
> On 2015-07-09 14:19:48 +0200, Michael Biebl wrote:
>> Am 09.07.2015 um 12:21 schrieb Vincent Lefevre:
>> > Remove the "allow-hotplug eth0" line and have eth0 be brought up
>> > automatically when there's an Ethernet signal? I haven't seen any
>> > drawback yet.
>>
>> The drawback is, that you might have (broken) software which depends on
>> $network.
>> /etc/init.d/networking provides $network and blocks until interfaces
>> marked auto (and interfaces marked allow-hotpug which exist at the time
>> the script is run) have been brought up.
>> If you bring up your interfaces via other means, /etc/init.d/networking
>> will simply do nothing (but still provide $network), so the boot
>> continues and software which requires $network will likely be started
>> too early and probably fail/behave incorrectly since they have no
>> network access.
>
> Wouldn't the right thing be to fix broken software? Software shouldn't
> just require $network, but something more precise and/or handle error
> conditions.
>
> The problem is that users without software really needing network
> (at least at boot time), typically laptop users, would be annoyed.
> This is the case with this machine.
>
> But if one of the goals of allow-hotplug is to do link detection
> (see my other message about that), then this is fine for laptops.

Just as a matter of interest, what network manager are you using? I'm
using Network Manager (on a couple of laptops) and have never observed
the problem you've been having. In my /e/n/i file I have (re: eth0)
this:

# The primary network interface
allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp

Network Manager only manages the eth0 interface if the dhcp line is
removed/commented. My laptops behave exactly as they should on boot up
- no hanging, and automatic connection to the appropriate WiFi
network.

Patrick


Reply to: