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

if node is -h then exit 0 else exit 1

This commit is contained in:
penguhyang 2015-09-21 04:30:27 -04:00
parent 6d347f66dd
commit 5326ece7cd

View File

@ -7,11 +7,16 @@
awk -v argc="$#" -v node="$1" -v cmd="$2" 'BEGIN {
port = 3001
action = "sh"
if( node=="-h" || argc !=2 || ! node || ! cmd){
if(node=="-h"){
print "Usage:\n\n runcmdinstaller <node> \"<command>\"\n"
print " make sure all the commands are quoted by \"\"\n";
exit 0;
}
if(argc !=2 || ! node || ! cmd){
print "Usage:\n\n runcmdinstaller <node> \"<command>\"\n"
print " make sure all the commands are quoted by \"\"\n";
exit 1;
}
ns = "/inet/tcp/0/" node "/" port