fix update-ssh-client-config

This commit is contained in:
Franzi 2024-12-28 17:22:21 +01:00
parent 1c3768100c
commit b84bfb909f
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
.secrets.cfg* .secrets.cfg*
__pycache__ __pycache__
*.swp *.swp
.direnv
.envrc.local

View file

@ -12,7 +12,7 @@
BW_TABLE_STYLE=grep bw nodes -a hostname -- "lambda:not node.dummy" | \ BW_TABLE_STYLE=grep bw nodes -a hostname -- "lambda:not node.dummy" | \
while read node addr while read node addr
do do
if [[ -z "$BW_SSH_HOOK_EXTRA_LINE" ]] if [[ -n "$BW_SSH_HOOK_EXTRA_LINE" ]]
then then
echo "Host $addr" >>"$tmpfile" echo "Host $addr" >>"$tmpfile"
echo "$BW_SSH_HOOK_EXTRA_LINE" >>"$tmpfile" echo "$BW_SSH_HOOK_EXTRA_LINE" >>"$tmpfile"
@ -20,7 +20,7 @@
fi fi
echo "Host $node" >>"$tmpfile" echo "Host $node" >>"$tmpfile"
echo "HostName $addr" >>"$tmpfile" echo "HostName $addr" >>"$tmpfile"
if [[ -z "$BW_SSH_HOOK_EXTRA_LINE" ]] if [[ -n "$BW_SSH_HOOK_EXTRA_LINE" ]]
then then
echo "$BW_SSH_HOOK_EXTRA_LINE" >>"$tmpfile" echo "$BW_SSH_HOOK_EXTRA_LINE" >>"$tmpfile"
fi fi