Merge pull request #8760 from marblenix/fix/Unable_to_list_network_interfaces_on_FreeBSD
Fix vagrant not being able to list network devices on some FreeBSD boxes.
This commit is contained in:
commit
5ee3b0c3b9
|
@ -18,7 +18,7 @@ module VagrantPlugins
|
|||
# Remove any previous network additions to the configuration file.
|
||||
commands << "sed -i'' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.conf"
|
||||
|
||||
comm.sudo("ifconfig -a | grep -o ^[0-9a-z]* | grep -v '^lo'", options) do |_, stdout|
|
||||
comm.sudo("ifconfig -a | grep -o '^[0-9a-z]*' | grep -v '^lo'", options) do |_, stdout|
|
||||
interfaces = stdout.split("\n")
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::ConfigureNetworks" do
|
|||
|
||||
before do
|
||||
allow(machine).to receive(:communicate).and_return(comm)
|
||||
comm.stub_command("ifconfig -a | grep -o ^[0-9a-z]* | grep -v '^lo'",
|
||||
comm.stub_command("ifconfig -a | grep -o '^[0-9a-z]*' | grep -v '^lo'",
|
||||
stdout: "em1\nem2")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue