Add -f for rcons to optionally take write privilege of the console. By default, rcons only return a readonly console
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3253 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d67e18f78a
commit
7fd9270d00
@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
CONSERVER=$2
|
||||
if [ $1 = -h ]; then
|
||||
echo "rcons - remotely accesses the serial console of a node"
|
||||
echo "rcons <singlenode>"
|
||||
echo "rcons <singlenode> [conserver] [-f]"
|
||||
echo "rcons [-h|--help|-v|--version]"
|
||||
exit 0
|
||||
fi
|
||||
@ -10,11 +10,16 @@ if [ $1 = -v ]; then
|
||||
echo "Version 2.1"
|
||||
exit 0
|
||||
fi
|
||||
#if [ -z "$CONSERVER" ]; then
|
||||
# CONSERVER=`nodels $1 nodehm.conserver`
|
||||
#if [ -z "$CONSERVER" ]; then
|
||||
# CONSERVER=`nodels $1 nodehm.conserver`
|
||||
#fi
|
||||
|
||||
if [ -n "$3" ] && [ "$3" = "-f" ]; then
|
||||
FORCE=-f
|
||||
CONSERVER=$2
|
||||
fi
|
||||
|
||||
if [ -n "$2" ] && [ "$2" = "-f" ]; then
|
||||
FORCE=-f
|
||||
fi
|
||||
|
||||
if [ -z "$CONSERVER" ]; then
|
||||
CONSERVER=$XCATHOST
|
||||
fi
|
||||
@ -32,5 +37,5 @@ if [ ! -f $HOME/.consolerc ]; then
|
||||
echo " sslcredentials $HOME/.xcat/client-cred.pem;" >> $HOME/.consolerc
|
||||
echo '}' >> $HOME/.consolerc
|
||||
fi
|
||||
|
||||
exec console -f -M $CONSERVER $1
|
||||
|
||||
exec console $FORCE -M $CONSERVER $1
|
||||
|
@ -2187,7 +2187,7 @@ nc_msg "$PROGRAM Status: finished connecting to $hcp\n"
|
||||
#
|
||||
nc_msg "$PROGRAM Status: open port\n"
|
||||
|
||||
if [ catch { spawn $CONSOLEBIN $name } rsconole_pid ] {
|
||||
if [ catch { spawn $CONSOLEBIN $name -f } rsconole_pid ] {
|
||||
send_user "Unable to spawn console connection to $hcp\n"
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user