guests/linux: LANG=en for ifconfig [GH-3029]

This commit is contained in:
Mitchell Hashimoto 2014-05-04 17:47:16 -07:00
parent 35b33ad581
commit 04369b3afe
2 changed files with 3 additions and 1 deletions

View File

@ -75,6 +75,8 @@ BUG FIXES:
- commands/rsync-auto: Interrupt exits properly. [GH-3552]
- commands/rsync-auto: Run properly on Windows. [GH-3547]
- communicators/ssh: Detect if `config.ssh.shell` is invalid. [GH-3040]
- guests/linux: For `read_ip_address` capability, set `LANG=en` so
it works on international systems. [GH-3029]
- providers/virtualbox: VirtalBox detection works properly again on
Windows when the `VBOX_INSTALL_PATH` has multiple elements. [GH-3549]
- providers/virtualbox: Forcing MAC address on private network works

View File

@ -3,7 +3,7 @@ module VagrantPlugins
module Cap
class ReadIPAddress
def self.read_ip_address(machine)
command = "ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'"
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