Blame SOURCES/0119-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch

18971c
From 054447fa23017df5a1774ce30082cb383be97cfa Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Tue, 4 Feb 2014 12:02:34 +0100
18971c
Subject: [PATCH] network/ifup: do not run dhclient twice on the same interface
18971c
18971c
---
18971c
 modules.d/40network/ifup.sh | 3 +++
18971c
 1 file changed, 3 insertions(+)
18971c
18971c
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
18971c
index 3a03d052..33ec81d1 100755
18971c
--- a/modules.d/40network/ifup.sh
18971c
+++ b/modules.d/40network/ifup.sh
18971c
@@ -91,6 +91,9 @@ do_dhcp() {
18971c
     # dhclient-script will mark the netif up and generate the online
18971c
     # event for nfsroot
18971c
     # XXX add -V vendor class and option parsing per kernel
18971c
+
18971c
+    [ -e /tmp/dhclient.$netif.pid ] && return 0
18971c
+
18971c
     if ! iface_has_link $netif; then
18971c
         echo "No carrier detected"
18971c
         return 1