From b030cc5b68244536bcd18225503aea37e6c4f5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Fri, 9 Apr 2021 11:41:52 +0200 Subject: [PATCH] change master lifetime --- functions.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 01c12bb..3a5e91f 100755 --- a/functions.sh +++ b/functions.sh @@ -368,8 +368,8 @@ sshs() { done fi echo "FILELIST: $FILELIST" - #local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=yes -o ControlPersist=15s -o ControlPath=~/.ssh/ssh-%C" - local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=yes -o ControlPersist=10s -o ControlPath=~/.ssh/ssh-%C" + local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=yes -o ControlPersist=15s -o ControlPath=~/.ssh/ssh-%C" + #local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=yes -o ControlPersist=10s -o ControlPath=~/.ssh/ssh-%C" # Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first cat << EOF >> "${TMPBASHCONFIG}" [ -e /etc/bashrc ] && BASHRC=/etc/bashrc @@ -407,6 +407,7 @@ EOF local RCMD="/bin/bash --noprofile --norc -c " logdebug "create remote bashrc" local REMOTETMPBASHCONFIG=$(ssh -T ${SSH_OPTS} $@ "mktemp -p \${XDG_RUNTIME_DIR-~} -t bashrc.XXXXXXXX --suffix=.conf"| tr -d '[:space:]' ) + ssh -T ${SSH_OPTS} $@ "stat ${REMOTETMPBASHCONFIG}" logdebug "create remote vimrc" local REMOTETMPVIMCONFIG=$(ssh -T ${SSH_OPTS} $@ "mktemp -p \${XDG_RUNTIME_DIR-~} -t vimrc.XXXXXXXX --suffix=.conf"| tr -d '[:space:]') @@ -424,7 +425,7 @@ EOF logdebug "create fill remote bashrc" ssh -T ${SSH_OPTS} $@ "cat > ${REMOTETMPBASHCONFIG}" < "${TMPBASHCONFIG}" - ssh -T ${SSH_OPTS} $@ "cat ${REMOTETMPBASHCONFIG}" + ssh -T ${SSH_OPTS} $@ "stat ${REMOTETMPBASHCONFIG}" logdebug "create fill remote vimrc" ssh -T ${SSH_OPTS} $@ "cat > ${REMOTETMPVIMCONFIG}" < "${MSC_BASE}/vimrc" RCMD="