git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Netgroups.
[profile.git]
/
opt
/
bin
/
sshcolourterm
diff --git
a/opt/bin/sshcolourterm
b/opt/bin/sshcolourterm
index
0cf4b9f
..
8bae4b0
100755
(executable)
--- a/
opt/bin/sshcolourterm
+++ b/
opt/bin/sshcolourterm
@@
-18,7
+18,7
@@
fi
# Get colour by netgroup.
if [ -z "$colour" ]; then
for netgroup in $(ls "$SSHCOLOURS" | grep ^\@); do
# Get colour by netgroup.
if [ -z "$colour" ]; then
for netgroup in $(ls "$SSHCOLOURS" | grep ^\@); do
- if netgroups $netgroup ${fqdn%%.*}
2
>/dev/null; then
+ if netgroups $netgroup ${fqdn%%.*}
&
>/dev/null; then
colour=$(readlink "$SSHCOLOURS/$netgroup")
break
fi
colour=$(readlink "$SSHCOLOURS/$netgroup")
break
fi
@@
-28,8
+28,8
@@
fi
if [ ! -z "$colour" ]; then
colour=${colour##*/}
colour=${colour##*:}
if [ ! -z "$colour" ]; then
colour=${colour##*/}
colour=${colour##*:}
- echo -e "\033]49;$colour\007"
- clear
fi
fi
-exec ${SSHTERM_SSH:-ssh} ${1+"$@"}
+[ -n "$colour" ] && colour="-bg $colour"
+exec ${SSHTERM:-xterm} ${SSHTERM_TITLE:--title} "$1" \
+ $colour ${SSHTERM_EXEC:--e} ${SSHTERM_SSH:-ssh} ${1+"$@"}