From 5326ece7cd5ce0f0234fe265ee993013593eeddd Mon Sep 17 00:00:00 2001 From: penguhyang Date: Mon, 21 Sep 2015 04:30:27 -0400 Subject: [PATCH] if node is -h then exit 0 else exit 1 --- xCAT-server/sbin/runcmdinstaller | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/runcmdinstaller b/xCAT-server/sbin/runcmdinstaller index d194d3c00..438db3f31 100755 --- a/xCAT-server/sbin/runcmdinstaller +++ b/xCAT-server/sbin/runcmdinstaller @@ -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 \"\"\n" print " make sure all the commands are quoted by \"\"\n"; exit 0; } +if(argc !=2 || ! node || ! cmd){ + print "Usage:\n\n runcmdinstaller \"\"\n" + print " make sure all the commands are quoted by \"\"\n"; + exit 1; +} ns = "/inet/tcp/0/" node "/" port