diff --git a/xCAT-client/bin/rcons b/xCAT-client/bin/rcons index f0b430a68..b52bd38f7 100755 --- a/xCAT-client/bin/rcons +++ b/xCAT-client/bin/rcons @@ -2,6 +2,7 @@ if [ -z "$1" ] || [ "$1" = "-h" ]; then echo "rcons - remotely accesses the serial console of a node" echo "rcons [conserver] [-f]" + echo "rcons [conserver] [-s]" echo "rcons [-h|--help|-v|--version]" exit 0 fi @@ -15,10 +16,21 @@ if [ -n "$3" ] && [ "$3" = "-f" ]; then CONSERVER=$2 fi +#console spy mode +if [ -n "$3" ] && [ "$3" = "-s" ]; then + FORCE=-s + CONSERVER=$2 +fi + if [ -n "$2" ] && [ "$2" = "-f" ]; then FORCE=-f fi +#console spy mode +if [ -n "$2" ] && [ "$2" = "-s" ]; then + FORCE=-s +fi + if [ -z "$CONSERVER" ]; then CONSERVER=`nodels $1 nodehm.conserver 2>/dev/null | awk -F: '{print $2}' | tr -d ' '` fi