mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-21 02:30:21 +00:00
update installnic files location and MTU
This commit is contained in:
@@ -31,7 +31,7 @@ check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:rc==0
|
||||
check:output=~booted
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
@@ -78,7 +78,7 @@ check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:rc==0
|
||||
check:output=~booted
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
@@ -154,7 +154,7 @@ cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1496
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
check:rc==0
|
||||
@@ -162,7 +162,6 @@ cmd:updatenode $$CN -P "confignetwork -s"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
check:output=~MTU=1496
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
@@ -194,6 +193,7 @@ cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep MTU /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~MTU=1496
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
@@ -228,10 +228,10 @@ check:output=~aliases1-1
|
||||
check:output=~aliases1-2
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
check:output!~dhcp
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~12.1.0.100
|
||||
check:output!~dhcp
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
|
Reference in New Issue
Block a user