]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/ifup: do not ifup an already setup network interface
authorHarald Hoyer <harald@redhat.com>
Tue, 4 Feb 2014 11:02:05 +0000 (12:02 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 4 Feb 2014 11:02:05 +0000 (12:02 +0100)
modules.d/40network/ifup.sh

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