From b0600423957e6c01d98cedb3cd0b31f11e3ab3cd Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 27 Jan 2012 15:18:05 +0000 Subject: [PATCH] Have dhclient more aggressively kill off stale ip addresses git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11422 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/dhclient-script | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-nbroot2/dhclient-script b/xCAT-nbroot2/dhclient-script index b78cb1bba..48a42161f 100755 --- a/xCAT-nbroot2/dhclient-script +++ b/xCAT-nbroot2/dhclient-script @@ -14,6 +14,9 @@ elif [ $reason = "BOUND" ]; then if [ ! -z "$old_ip_address" ]; then ip addr del dev $interface $old_ip_address/$old_subnet_mask fi + for oldip in `ip addr show dev $interface|grep 'inet '|awk '{print $2}'`; do + ip addr del dev $interface $oldip + done if [ ! -z "$new_ip_address" -a ! -z "$new_subnet_mask" ]; then ip addr add dev $interface $new_ip_address/$new_subnet_mask fi