mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-19 21:00:24 +00:00
62 lines
1.1 KiB
Plaintext
62 lines
1.1 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:grep $$CN /etc/hosts
|
|
cmd:interface=`xdsh $$CN 'ip route' | awk '/default/ { for (i = 1; i <= NF; ++i) if ("dev" == $i) { print $(i + 1) ; exit } }'`; echo "interface=$interface"; sed -i "/$$CN/s/$/ $$CN-$interface/g" '/etc/hosts';psh -i $interface $$CN 'uptime'
|
|
check:output=~$$CN
|
|
check:rc==0
|
|
cmd:grep $$CN /etc/hosts
|
|
cmd:rm -rf /etc/hosts
|
|
cmd:cp /etc/hostsBK /etc/hosts
|
|
check:rc==0
|
|
end
|
|
|