Sha256: 27876dc186c76330a8ed9ecfea26692bf512157e48b06e287a5640de405ecd7b

Contents?: true

Size: 504 Bytes

Versions: 27

Compression:

Stored size: 504 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'
      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

27 entries across 27 versions & 1 rubygems

Version Path
beaker-1.21.0 lib/beaker/host/unix/exec.rb
beaker-1.20.1 lib/beaker/host/unix/exec.rb
beaker-1.20.0 lib/beaker/host/unix/exec.rb
beaker-1.19.1 lib/beaker/host/unix/exec.rb
beaker-1.19.0 lib/beaker/host/unix/exec.rb
beaker-1.18.0 lib/beaker/host/unix/exec.rb
beaker-1.17.7 lib/beaker/host/unix/exec.rb
beaker-1.17.6 lib/beaker/host/unix/exec.rb
beaker-1.17.5 lib/beaker/host/unix/exec.rb
beaker-1.17.4 lib/beaker/host/unix/exec.rb
beaker-1.17.3 lib/beaker/host/unix/exec.rb
beaker-1.17.2 lib/beaker/host/unix/exec.rb
beaker-1.17.1 lib/beaker/host/unix/exec.rb
beaker-1.17.0 lib/beaker/host/unix/exec.rb
beaker-1.16.0 lib/beaker/host/unix/exec.rb
beaker-1.15.0 lib/beaker/host/unix/exec.rb
beaker-1.14.1 lib/beaker/host/unix/exec.rb
beaker-1.14.0 lib/beaker/host/unix/exec.rb
beaker-1.13.1 lib/beaker/host/unix/exec.rb
beaker-1.13.0 lib/beaker/host/unix/exec.rb