scripts/update-ssh-client-config: add configurable extra line
This commit is contained in:
parent
3e6872c96b
commit
5afe534d9c
1 changed files with 11 additions and 1 deletions
|
@ -12,10 +12,20 @@
|
||||||
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" ]]
|
||||||
|
then
|
||||||
|
echo "Host $addr" >>"$tmpfile"
|
||||||
|
echo "$BW_SSH_HOOK_EXTRA_LINE" >>"$tmpfile"
|
||||||
|
echo "" >>"$tmpfile"
|
||||||
|
fi
|
||||||
echo "Host $node" >>"$tmpfile"
|
echo "Host $node" >>"$tmpfile"
|
||||||
echo "HostName $addr" >>"$tmpfile"
|
echo "HostName $addr" >>"$tmpfile"
|
||||||
|
if [[ -z "$BW_SSH_HOOK_EXTRA_LINE" ]]
|
||||||
|
then
|
||||||
|
echo "$BW_SSH_HOOK_EXTRA_LINE" >>"$tmpfile"
|
||||||
|
fi
|
||||||
echo "" >>"$tmpfile"
|
echo "" >>"$tmpfile"
|
||||||
done
|
done
|
||||||
|
|
||||||
mv "$tmpfile" ~/.ssh/bwnodes
|
mv "$tmpfile" ~/.ssh/config.d/bwnodes
|
||||||
) &
|
) &
|
||||||
|
|
Loading…
Reference in a new issue