2008-01-10 01:59:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
CONSERVER=`nodels $1 nodehm.conserver`
|
|
|
|
if [ -z $CONSERVER ]; then
|
|
|
|
CONSERVER=$XCATHOST
|
|
|
|
fi
|
|
|
|
if [ -z $CONSERVER ]; then
|
|
|
|
CONSERVER=localhost
|
|
|
|
fi
|
2008-01-10 02:02:57 +00:00
|
|
|
#NOTE: IPv6 is not good with the below if going by IP, needs more sophisticated
|
|
|
|
#parsing
|
|
|
|
CONSERVER=`echo $CONSERVER|cut -d: -f 1`
|
2008-01-10 01:59:16 +00:00
|
|
|
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
|