Fix vagrant not being able to list network devices on FreeBSD boxes.
This commit is contained in:
parent
c6e9a9a5b7
commit
2aceb03b19
|
@ -18,7 +18,7 @@ module VagrantPlugins
|
||||||
# Remove any previous network additions to the configuration file.
|
# Remove any previous network additions to the configuration file.
|
||||||
commands << "sed -i'' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.conf"
|
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")
|
interfaces = stdout.split("\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::ConfigureNetworks" do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
allow(machine).to receive(:communicate).and_return(comm)
|
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")
|
stdout: "em1\nem2")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue