mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	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:
		@@ -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
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user