mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	fix duplicate lines for IPADDR and NETMASK
This commit is contained in:
		@@ -114,8 +114,18 @@ EOF
 | 
			
		||||
        sed -i s/BOOTPROTO=dhcp/BOOTPROTO=static/ $NICFILE
 | 
			
		||||
        sed -i s/BOOTPROTO=\'dhcp\'/BOOTPROTO=static/ $NICFILE
 | 
			
		||||
        sed -i s/BOOTPROTO=\"dhcp\"/BOOTPROTO=static/ $NICFILE
 | 
			
		||||
        grep ^IPADDR= $NICFILE >/dev/null
 | 
			
		||||
        if [ $? -eq 0 ]
 | 
			
		||||
        then
 | 
			
		||||
            sed -i '/IPADDR=/d'  $NICFILE
 | 
			
		||||
        fi
 | 
			
		||||
        echo IPADDR=$IPADDR >> $NICFILE
 | 
			
		||||
        echo NETMASK=$NETMASK >> $NICFILE 
 | 
			
		||||
        grep ^NETMASK= $NICFILE >/dev/null
 | 
			
		||||
        if [ $? -eq 0 ]
 | 
			
		||||
        then
 | 
			
		||||
            sed -i '/NETMASK=/d' $NICFILE
 | 
			
		||||
        fi
 | 
			
		||||
        echo NETMASK=$NETMASK >> $NICFILE    
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    #for netboot/statelite case, restart the network interface. For diskful installation, it is not necessary because the restart of the network  will happen at the first boot.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user