mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 12:20:40 +00:00
completed
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user