]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/ifup: do not run dhclient twice on the same interface
authorHarald Hoyer <harald@redhat.com>
Tue, 4 Feb 2014 11:02:34 +0000 (12:02 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 4 Feb 2014 11:02:34 +0000 (12:02 +0100)
modules.d/40network/ifup.sh

index 3a03d05249cd27763a2616b7382895b88d66329b..33ec81d1e4ba28811e7f8b4f53505ec98221b402 100755 (executable)
@@ -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