Sha256: 03eae9c7cd77bebdc75f56ccda1c4d9496da82f9ee8934fcd2291848f9e46299
Contents?: true
Size: 541 Bytes
Versions: 13
Compression:
Stored size: 541 Bytes
Contents
module Unix::Exec include Beaker::CommandFactory def echo(msg, abs=true) (abs ? '/bin/echo' : 'echo') + " #{msg}" end def touch(file, abs=true) (abs ? '/bin/touch' : 'touch') + " #{file}" end def path '/bin:/usr/bin' end def get_ip if self['platform'].include?('solaris') || self['platform'].include?('osx') execute("ifconfig -a inet| awk '/broadcast/ {print $2}' | cut -d/ -f1 | head -1").strip else execute("ip a|awk '/global/{print$2}' | cut -d/ -f1 | head -1").strip end end end
Version data entries
13 entries across 13 versions & 1 rubygems