From 084f5e12eb6d42560c28076c349afd780eab125b Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 14 Dec 2009 14:21:30 +0000 Subject: Fix restart with iproute2 --- init.d/network.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'init.d') diff --git a/init.d/network.in b/init.d/network.in index bcbabc67..f32bcb4d 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -287,6 +287,11 @@ stop() then veinfo "$int" runargs /etc/ifdown."$int" "$downcmd" + if [ -x /sbin/ip ]; then + # We need to do this, otherwise we may + # fail to add things correctly on restart + ip address flush dev "$int" 2>/dev/null + fi ifconfig "$int" down 2>/dev/null ifconfig "$int" destroy 2>/dev/null fi -- cgit v1.2.3