The manpage for dhclient-script says:
Before actually configuring the address, dhclient-script should
somehow ARP for it and exit with a nonzero status if it receives a
reply.
By using arping in dracut this is very easy, since arping has a
specific option to do just that.
---
modules.d/40network/dhclient-script | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules.d/40network/dhclient-script
b/modules.d/40network/dhclient-script
index 013c8f1..b03cf1c 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -64,6 +64,10 @@ case $reason in
sleep 1
;;
BOUND)
+ if ! arping -q -D -c 2 -I $netif $new_ip_address ; then
+ warn "Duplicate address detected for $new_ip_address while doing
dhcp. retrying"
+ exit 1
+ fi
setup_interface
set | while read line; do
[ "${line#new_}" = "$line" ] && continue
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html