From bfec7d134fabe1b0588199d8e5f4c810dfc11db9 Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Thu, 23 Feb 2017 16:42:34 +0700 Subject: [PATCH] sbin: start-networking: adjust allow-hotplug behavior to ifupdown Ticket: Bug#855598: src:ifupdown2: allow-hotplug behaves differently, not UPing interfaces Reviewed By: Roopa Testing Done: mark an interface (ethX) as hotplug then reboot Signed-off-by: Julien Fortin --- sbin/start-networking | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/start-networking b/sbin/start-networking index f4796d8..5232e88 100755 --- a/sbin/start-networking +++ b/sbin/start-networking @@ -87,7 +87,9 @@ ifup_hotplug () { do link=${iface##:*} link=${link##.*} - if [ -e "/sys/class/net/$link" ] + + ip link set "$iface" up || true + if [ "$(cat /sys/class/net/$link/operstate)" = up ] then echo "$iface" fi -- 2.39.5