Currently, even though I've not set a value for ssh_proxy, the code block in this if statement is executed, presumably because "" in Ruby considered true:
Feb 23 12:29:14 nms oxidized[146462]: 192.168.20.1 raised Net::SSH::Proxy::ConnectError (rescued RuntimeError) with msg "command failed: ssh -o StrictHostKeyChecking=no -W 192.168.20.1:22"
The linked if statement should be modified to grab the variable and check that it's not nil or empty before executing the corresponding code block.
This is similar to #1936, but slightly different.
Take the following config extract:
and the following mysql table row:
Currently, even though I've not set a value for
ssh_proxy
, the code block in this if statement is executed, presumably because""
in Ruby consideredtrue
:The linked if statement should be modified to grab the variable and check that it's not
nil
orempty
before executing the corresponding code block.