/usr/lib/ruby/vendor_ruby/specinfra/command/openbsd/base/interface.rb is in ruby-specinfra 2.35.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | class Specinfra::Command::Openbsd::Base::Interface < Specinfra::Command::Base::Interface
class << self
def check_exists(name)
"ifconfig #{name}"
end
def get_speed_of(name)
"ifconfig #{name} | grep 'media\:' | perl -pe 's|.*media\:.*\\((.*?)\\)|\\1|'"
end
def check_has_ipv4_address(interface, ip_address)
"ifconfig #{interface} | grep -w inet | cut -d ' ' -f 2"
end
def check_has_ipv6_address(interface, ip_address)
"ifconfig #{interface} | grep -w inet6 | cut -d ' ' -f 2"
end
end
end
|