[PATCH 5/5] Do not run dhclient if the interface is already up.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 hooks/run-dhclient.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hooks/run-dhclient.sh b/hooks/run-dhclient.sh
index fcf890e..afab037 100755
--- a/hooks/run-dhclient.sh
+++ b/hooks/run-dhclient.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 for i in /net.*.dhcp; do
     dev=${i#net.}; dev=${i%.dhcp}
+    [ -f "/net.$dev.up" ] && continue
     dhclient -1 -q $dev &
 done
 wait
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux