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*
__pycache__
*.swp
.direnv
.envrc.local

View file

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