Have dhclient work less hard at releases leases in discovery. Worst case, a lease sits used until expiry

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10628 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-09-23 18:01:23 +00:00
parent 4d94fc8ad1
commit 6bbdfacc66

View File

@ -7,7 +7,7 @@ if [ ! -z "$FORCENICS" ]; then
for pidfile in /var/run/dhclient.*.pid; do
NIC=`echo $pidfile|awk -F. '{print $2}'`
if [ ! -z "$NIC" -a "$NIC" != "$FORCENICS" ]; then
dhclient -r -cf /etc/dhclient.conf -pf $pidfile $NIC
dhclient -r -1 -cf /etc/dhclient.conf -pf $pidfile $NIC
rm $pidfile
ip link set $NIC down
fi
@ -15,7 +15,7 @@ if [ ! -z "$FORCENICS" ]; then
for pidfile in /var/run/dhclient6.*.pid; do
NIC=`echo $pidfile|awk -F. '{print $2}'`
if [ ! -z "$NIC" -a "$NIC" != "$FORCENICS" ]; then
dhclient -6 -r -pf $pidfile -lf /var/lib/dhclient/dhclient6.leases $NIC
dhclient -6 -r -1 -pf $pidfile -lf /var/lib/dhclient/dhclient6.leases $NIC
rm $pidfile
ip link set $NIC down
fi
@ -25,12 +25,12 @@ WAITING=1
while [ $WAITING -gt 0 ]; do
for pidfile in /var/run/dhclient.*.pid; do
NIC=`echo $pidfile|awk -F. '{print $2}'`
dhclient -r -cf /etc/dhclient.conf -pf $pidfile $NIC
dhclient -r -1 -cf /etc/dhclient.conf -pf $pidfile $NIC
dhclient -cf /etc/dhclient.conf -nw -pf $pidfile $NIC
done
for pidfile in /var/run/dhclient6.*.pid; do
NIC=`echo $pidfile|awk -F. '{print $2}'`
dhclient -6 -r -pf $pidfile -lf /var/lib/dhclient/dhclient6.leases $NIC
dhclient -6 -r -1 -pf $pidfile -lf /var/lib/dhclient/dhclient6.leases $NIC
dhclient -6 -pf $pidfile -nw -lf /var/lib/dhclient/dhclient6.leases $NIC
done