2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 12:20:40 +00:00

completed

This commit is contained in:
caomengmeng
2017-01-11 02:49:09 -05:00
parent 5d3523fc5a
commit 1724c7ea04

View File

@ -47,8 +47,13 @@ end
start:psh_i
description: psh -i interface CN 'uptime' in linux
os:Linux
cmd:cp /etc/hosts /etc/hostsBK
check:rc==0
cmd:interface=`xdsh $$CN 'ifconfig' | sed -n 1p | awk -F : '{print $2}' | awk -F ' ' '{print $1}'`;sed -i "s/com $$CN/com $$CN $$CN-$interface/g" '/etc/hosts';psh -i $interface $$CN 'uptime'
check:output=~$$CN
check:rc==0
cmd:rm -rf /etc/hosts
cmd:cp /etc/hostsBK /etc/hosts
check:rc==0
end