2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Merge pull request #5467 from neo954/psh-i

Fix psh_i test case on Ubuntu 18.04
This commit is contained in:
Weihua Hu 2018-08-06 16:09:29 +08:00 committed by GitHub
commit 5d0db4e092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ description: psh -i interface CN 'uptime' in linux
os:Linux
cmd:cp /etc/hosts /etc/hostsBK
check:rc==0
cmd:interface=`xdsh $$CN 'ip route' | awk '/default/ { print $NF }'`;sed -i "/$$CN/s/$/ $$CN-$interface/g" '/etc/hosts';psh -i $interface $$CN 'uptime'
cmd:interface=`xdsh $$CN 'ip route' | awk '/default/ { for (i = 1; i <= NF; ++i) if ("dev" == $i) { print $(i + 1) ; exit } }'`;sed -i "/$$CN/s/$/ $$CN-$interface/g" '/etc/hosts';psh -i $interface $$CN 'uptime'
check:output=~$$CN
check:rc==0
cmd:rm -rf /etc/hosts