diff --git a/perl-xCAT-2.0/xCAT/Client.pm b/perl-xCAT-2.0/xCAT/Client.pm index f44e12b4c..6949797b5 100644 --- a/perl-xCAT-2.0/xCAT/Client.pm +++ b/perl-xCAT-2.0/xCAT/Client.pm @@ -112,7 +112,7 @@ sub submit_request { SSL_ca_file => $ENV{HOME}."/.xcat/ca.pem", SSL_use_cert => 1, ); - die "Connection failure: $!\n" unless ($client); + die "Connection failure: $@\n" unless ($client); my $msg=XMLout($request,RootName=>xcatrequest,NoAttr=>1,KeyAttr=>[]); print $client $msg; my $response; diff --git a/xCAT-client-2.0/bin/rcons b/xCAT-client-2.0/bin/rcons new file mode 100755 index 000000000..4ed424df7 --- /dev/null +++ b/xCAT-client-2.0/bin/rcons @@ -0,0 +1,16 @@ +#!/bin/sh +CONSERVER=`nodels $1 nodehm.conserver` +if [ -z $CONSERVER ]; then + CONSERVER=$XCATHOST +fi +if [ -z $CONSERVER ]; then + CONSERVER=localhost +fi +if [ ! -f $HOME/.consolerc ]; then + echo 'config * {' > $HOME/.consolerc + echo " sslauthority $HOME/.xcat/ca.pem;" >> $HOME/.consolerc + echo " sslcredentials $HOME/.xcat/client-cred.pem;" >> $HOME/.consolerc + echo '}' >> $HOME/.consolerc +fi + +exec console -M $CONSERVER $1 diff --git a/xCAT-client-2.0/bin/wcons b/xCAT-client-2.0/bin/wcons new file mode 100755 index 000000000..6f57d6f8c --- /dev/null +++ b/xCAT-client-2.0/bin/wcons @@ -0,0 +1,12 @@ +#!/bin/sh +#A placeholder wcons, a fuller port from 1.3 is needed +if [ -z "$DISPLAY" ]; then + echo '$DISPLAY not set' + exit 1 +fi +NODES=`nodels $1` +MYDIR=`dirname $0` +for n in $NODES +do + xterm -rv -name wcons -T $n -n $n -e $MYDIR/rcons $n & +done