mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 01:56:39 +00:00
Merge pull request #3427 from tingtli/refinecase
refine confignetwork cases
This commit is contained in:
commit
bb56f78b39
@ -174,9 +174,7 @@ check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:confignetwork_secondarynic_updatenode
|
||||
@ -195,7 +193,7 @@ 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 |mtu 1496
|
||||
check:output=~MTU=1496|mtu 1496
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
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
|
||||
@ -203,9 +201,7 @@ check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start: confignetwork_secondarynic_nicaliases_updatenode
|
||||
@ -246,9 +242,7 @@ cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm
|
||||
check:rc==0
|
||||
cmd:mv -f /etc/hosts.bak /etc/hosts
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:confignetwork_secondarynic_nicextraparams_updatenode
|
||||
@ -278,7 +272,7 @@ check:output=~11.1.0.100
|
||||
check:output!~dhcp
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~12.1.0.100
|
||||
check:output=~CONNECTED_MODE=yes | CONNECTED_MODE yes
|
||||
check:output=~CONNECTED_MODE=yes|CONNECTED_MODE yes
|
||||
check:output!~dhcp
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
@ -290,9 +284,7 @@ cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm
|
||||
check:rc==0
|
||||
cmd:mv -f /etc/hosts.bak /etc/hosts
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:confignetwork_secondarynic_nicnetworks_updatenode_false
|
||||
@ -466,7 +458,5 @@ cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm
|
||||
check:rc==0
|
||||
cmd:mv -f /etc/hosts.bak /etc/hosts
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
check:rc==0
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user