mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 10:06:39 +00:00
60 lines
1.0 KiB
Plaintext
60 lines
1.0 KiB
Plaintext
start:psh_h
|
|
description: psh -h and psh -help
|
|
os:Linux
|
|
cmd:psh -h
|
|
check:rc==0
|
|
check:output=~Usage
|
|
cmd:psh --help
|
|
check:rc==0
|
|
check:output=~Usage
|
|
end
|
|
|
|
start:psh_v
|
|
description: psh -v
|
|
os:Linux
|
|
cmd:psh -v
|
|
check:output=~Version
|
|
check:rc==0
|
|
end
|
|
|
|
start:psh_node_cmd_linux
|
|
description: psh CN 'pwd' in linux
|
|
os:Linux
|
|
cmd:psh $$CN 'pwd'
|
|
check:rc==0
|
|
check:output=~$$CN
|
|
check:output=~/
|
|
end
|
|
|
|
start:psh_node_cmd_aix
|
|
description: psh CN 'pwd' in AIX
|
|
os:Aix
|
|
cmd:psh $$CN 'pwd'
|
|
check:rc==0
|
|
check:output=~$$CN
|
|
check:output=~/root
|
|
end
|
|
|
|
start:psh_l
|
|
description: psh -l user CN 'uptime' in linux
|
|
os:Linux
|
|
cmd:psh -l root $$CN 'uptime'
|
|
check:rc==0
|
|
check:output=~$$CN
|
|
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 "/$$CN/s/$/ $$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
|
|
|