dracut/0010-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch
Harald Hoyer bcb5fa941d dracut-036-16.git20140206
- version 036
- parse dns information on "ip=" command line arg
- preserve ownership of files, if root creates the initramfs
- parse ibft nameserver settings
- do not run dhcp twice on an interface
- try to not reload systemd
2014-02-06 17:06:12 +01:00

24 lines
802 B
Diff

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