git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.bash/exec.bash
diff options
context:
space:
mode:
Diffstat (limited to '.bash/exec.bash')
-rw-r--r--.bash/exec.bash15
1 files changed, 14 insertions, 1 deletions
diff --git a/.bash/exec.bash b/.bash/exec.bash
index 713e1ab..aeba7ca 100644
--- a/.bash/exec.bash
+++ b/.bash/exec.bash
@@ -7,7 +7,20 @@ set bell-style visible
# start ssh agent. this script will not try to run a new instance
# (unless we specified -f, which we don't).
-if echo "${SSHAGH[@]}" | grep -F --word-regexp "$(hostname -f)" > /dev/null;then
+SSHRUN=0
+case "$OSNAME" in
+ 'sunos')
+ if echo "${SSHAGH[@]}" | grep -E "^$(cat /etc/nodename)\$" > /dev/null; then
+ SSHRUN=1
+ fi
+ ;;
+ *)
+ if echo "${SSHAGH[@]}" | grep -F --word-regexp "$(hostname -f)" > /dev/null;then
+ SSHRUN=1
+ fi
+ ;;
+esac
+if [ "$SSHRUN" -eq 1 ]; then
# do not launch from SSH session, conflicts with user logging on locally afterwards
if [ -z "$SSH_TTY" ];then
"$HOME/bin/ssh-agent-launcher" -q