change debug

This commit is contained in:
Jakobus Schürz 2021-04-28 09:14:20 +02:00
parent 6e4814c04a
commit 09817e390f

View file

@ -363,7 +363,7 @@ sshs() {
if [ -e "${HOME}/.config/myshellconfig/sshs_addfiles.conf" ] ; then if [ -e "${HOME}/.config/myshellconfig/sshs_addfiles.conf" ] ; then
for f in $(cat "${HOME}/.config/myshellconfig/sshs_addfiles.conf");do for f in $(cat "${HOME}/.config/myshellconfig/sshs_addfiles.conf");do
[ -e "$f" ] && {\ [ -e "$f" ] && {\
loginfo "add $f to FILELIST"; \ logdebug "add $f to FILELIST"; \
FILELIST+=("$f"); } FILELIST+=("$f"); }
done done
fi fi
@ -407,12 +407,12 @@ EOF
logdebug "create remote bashrc" logdebug "create remote bashrc"
logdebug "SSH_OPTS: $SSH_OPTS" logdebug "SSH_OPTS: $SSH_OPTS"
local REMOTETMPBASHCONFIG=$(ssh -T ${SSH_OPTS} $@ "mktemp -p \${XDG_RUNTIME_DIR-~} -t bashrc.XXXXXXXX --suffix=.conf" | tr -d '[:space:]' ) local REMOTETMPBASHCONFIG=$(ssh -T ${SSH_OPTS} $@ "mktemp -p \${XDG_RUNTIME_DIR-~} -t bashrc.XXXXXXXX --suffix=.conf" | tr -d '[:space:]' )
logwarn "REMOTETMPBASHCONFIG: $REMOTETMPBASHCONFIG" logdebug "REMOTETMPBASHCONFIG: $REMOTETMPBASHCONFIG"
logdebug $(ssh -T ${SSH_OPTS} $@ "stat ${REMOTETMPBASHCONFIG}") logdebug $(ssh -T ${SSH_OPTS} $@ "stat ${REMOTETMPBASHCONFIG}")
logdebug $(ssh -T ${SSH_OPTS} $@ "hostnamectl") logdebug $(ssh -T ${SSH_OPTS} $@ "hostnamectl")
logdebug "create remote vimrc" logdebug "create remote vimrc"
local REMOTETMPVIMCONFIG=$(ssh -T ${SSH_OPTS} $@ "mktemp -p \${XDG_RUNTIME_DIR-~} -t vimrc.XXXXXXXX --suffix=.conf" | tr -d '[:space:]' ) local REMOTETMPVIMCONFIG=$(ssh -T ${SSH_OPTS} $@ "mktemp -p \${XDG_RUNTIME_DIR-~} -t vimrc.XXXXXXXX --suffix=.conf" | tr -d '[:space:]' )
logwarn "REMOTETMPVIMCONFIG: $REMOTETMPVIMCONFIG" logdebug "REMOTETMPVIMCONFIG: $REMOTETMPVIMCONFIG"
# Add additional aliases to bashrc for remote-machine # Add additional aliases to bashrc for remote-machine
cat << EOF >> "${TMPBASHCONFIG}" cat << EOF >> "${TMPBASHCONFIG}"
@ -438,7 +438,7 @@ EOF
ssh -t ${SSH_OPTS} $@ "$RCMD; SSHS=true bash -c \"function bash () { /bin/bash --rcfile ${REMOTETMPBASHCONFIG} -i ; } ; export -f bash; exec bash --rcfile ${REMOTETMPBASHCONFIG}\"" ssh -t ${SSH_OPTS} $@ "$RCMD; SSHS=true bash -c \"function bash () { /bin/bash --rcfile ${REMOTETMPBASHCONFIG} -i ; } ; export -f bash; exec bash --rcfile ${REMOTETMPBASHCONFIG}\""
rm "${TMPBASHCONFIG}" rm "${TMPBASHCONFIG}"
else else
loginfo "${TMPBASHCONFIG} does not exist. Using »ssh -t $@«" logwarn "${TMPBASHCONFIG} does not exist. Using »ssh -t $@«"
ssh -t "$@" ssh -t "$@"
fi fi
else else
@ -794,7 +794,7 @@ reachable () {
local i local i
loginfo -n "Try to connect to ${SERVER} (${IP}):${PORT} " >&2 loginfo -n "Try to connect to ${SERVER} (${IP}):${PORT} " >&2
for i in $(seq 1 $SEC); do for i in $(seq 1 $SEC); do
logdebug -n "." >&2 loginfo -n "." >&2
if reachable-default ${IP} ${PORT} 2>/dev/null; then if reachable-default ${IP} ${PORT} 2>/dev/null; then
res=0 res=0
break break