lib/instana/agent.rb in instana-1.8.0 vs lib/instana/agent.rb in instana-1.8.1
- old
+ new
@@ -44,10 +44,10 @@
@is_linux = (RUBY_PLATFORM =~ /linux/i) ? true : false
@is_osx = (RUBY_PLATFORM =~ /darwin/i) ? true : false
# In case we're running in Docker, have the default gateway available
# to check in case we're running in bridged network mode
- if @is_linux
+ if @is_linux && File.exist?("/sbin/ip")
@default_gateway = `/sbin/ip route | awk '/default/ { print $3 }'`.chomp
else
@default_gateway = nil
end