Bugfix: renamed the internal variables $USER and $HOST to $RUSER and $RHOST,
because $USER will be inherited to the shell within the term.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ~/scripts/xtermmaker.sh
|
||||
# $Id: xtermmaker.sh,v 1.9 2006/02/10 11:43:53 heinzel Exp $
|
||||
VERSION='XTermMaker Version 4.1 $Revision: 1.9 $ ($Date: 2006/02/10 11:43:53 $ $Author: heinzel $)'
|
||||
# $Id: xtermmaker.sh,v 1.10 2006/11/11 18:35:38 heinzel Exp $
|
||||
VERSION='XTermMaker Version 4.2 $Revision: 1.10 $ ($Date: 2006/11/11 18:35:38 $ $Author: heinzel $)'
|
||||
|
||||
### config ###
|
||||
CONFIG="${HOME}/.xtermmakerrc"
|
||||
@@ -16,8 +16,8 @@ XTERM="xterm"
|
||||
XTERM_OPTS="-sb -sl 1024"
|
||||
|
||||
RSH="ssh"
|
||||
HOST=""
|
||||
USER=""
|
||||
RHOST=""
|
||||
RUSER=""
|
||||
|
||||
# if cols > 0, we arange the possitions of the xterms in $cols columns
|
||||
COLS=0
|
||||
@@ -191,12 +191,12 @@ while test $# -gt 0 ; do
|
||||
shift
|
||||
;;
|
||||
-u|-user|--user)
|
||||
USER="$2"
|
||||
RUSER="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-r|-host|--host)
|
||||
HOST="$2"
|
||||
RHOST="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
@@ -301,10 +301,10 @@ until test $xterm_count -gt $NUMBER ; do
|
||||
pos_opt=""
|
||||
fi
|
||||
|
||||
if test "X${HOST}" != "X" ; then
|
||||
t="$HOST"
|
||||
if test "X${USER}" != "X" ; then
|
||||
t="${USER}@${HOST}"
|
||||
if test "X${RHOST}" != "X" ; then
|
||||
t="$RHOST"
|
||||
if test "X${RUSER}" != "X" ; then
|
||||
t="${RUSER}@${RHOST}"
|
||||
fi
|
||||
exec_opt="-e $RSH $t"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user