Sha256: 09b2d6b1cabbf69ccae657db34f2f518a6ad1d7548a6b1ec6f5eed585506654b
Contents?: true
Size: 469 Bytes
Versions: 5
Compression:
Stored size: 469 Bytes
Contents
module VagrantPlugins module GuestLinux module Cap class ReadIPAddress def self.read_ip_address(machine) command = "LANG=en ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'" result = "" machine.communicate.execute(command) do |type, data| result << data if type == :stdout end result.chomp.split("\n").first end end end end end
Version data entries
5 entries across 2 versions & 2 rubygems