There is a conflict between /lib/udev/ifupdown-hotplug and /etc/init.d/networking that causes boot to hang several minutes when interface is configured to DHCP and doesn't get any DHCP response.
In that case the udev trigger will try for several minutes and keeping the interface locked, while the ifup_hotplug() function tries to configure the interface again, causing the bootup to stall because of waiting for the lock. IMHO, this is function is completely wrong in case of the udev trigger already doing the probing. Hotfix by just returning out of the function. A clean solution should check whether interface is already locked and skip it in this case. Signed-off-by: Enrico Weigelt, metux IT consult <i...@metux.net> --- debian/changelog | 8 +++++++- debian/networking.init | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 28ad036..11f0bd8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -ifupdown (0.8.19) unstable; urgency=medium +ifupdown (0.8.19.1) unstable; urgency=high + + * Fix three years old bug: boot hang when dhcp unreachable. Closes: #838871 + + -- Enrico Weigelt, metux IT consult <i...@metux.net> Wed, 04 Jan 2019 15:02:00 +0200 + +ifupdown (0.8.19.0) unstable; urgency=medium * Fix exit code of ifquery --state. Closes: #852976 diff --git a/debian/networking.init b/debian/networking.init index ec00e97..a48ff5b 100644 --- a/debian/networking.init +++ b/debian/networking.init @@ -99,6 +99,18 @@ check_network_swap() { } ifup_hotplug () { + ## this conflicts with /lib/udev/ifupdown-hotplug and causes + ## boot to hang several minutes when interface is configured to + ## DHCP and doesn't get any DHCP response. + ## in that case the udev trigger will try for several minutes + ## and keeping the interface locked, while the ifup_hotplug() + ## function tries to configure the interface again, causing the + ## bootup to stall because of waiting for the lock + ## + ## IMHO, this is function is completely wrong in case of the + ## udev trigger already doing the probing + return 0 + if [ -d /sys/class/net ] then ifaces=$(for iface in $(ifquery --list --allow=hotplug) -- 1.9.1