dracut/0009-network-ifup-do-not-ifup-an-already-setup-network-in.patch

27 lines
895 B
Diff
Raw Normal View History

From d61a423f7cb326848e952d9e13a8cbf25ca06631 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 4 Feb 2014 12:02:05 +0100
Subject: [PATCH] network/ifup: do not ifup an already setup network interface
---
modules.d/40network/ifup.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index b33981b..3a03d05 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -80,7 +80,11 @@ fi
# in netroot case we prefer netroot to bringup $netif automaticlly
[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
[ -z "$netroot" ] && [ -z "$manualup" ] && exit 0
-[ -n "$manualup" ] && >/tmp/net.$netif.manualup
+if [ -n "$manualup" ]; then
+ >/tmp/net.$netif.manualup
+else
+ [ -f /tmp/net.${iface}.did-setup ] && exit 0
+fi
# Run dhclient
do_dhcp() {