Redirect redir stderr to /dev/null

Closes #51
This commit is contained in:
Fabio Rehm 2013-04-10 02:22:19 -03:00
parent a9c4745b78
commit 2e14c974d7
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ module Vagrant
end
def redirect_port(host, guest)
redir_cmd = "sudo redir --laddr=127.0.0.1 --lport=#{host} --cport=#{guest} --caddr=#{@container_ip}"
redir_cmd = "sudo redir --laddr=127.0.0.1 --lport=#{host} --cport=#{guest} --caddr=#{@container_ip} 2>/dev/null"
@logger.debug "Forwarding port with `#{redir_cmd}`"
fork { exec redir_cmd }

View file

@ -30,7 +30,7 @@ describe Vagrant::LXC::Action::ForwardPorts do
it 'forwards ports using redir' do
subject.should have_received(:exec).with(
"sudo redir --laddr=127.0.0.1 --lport=#{host_port} --cport=#{guest_port} --caddr=#{container_ip}"
"sudo redir --laddr=127.0.0.1 --lport=#{host_port} --cport=#{guest_port} --caddr=#{container_ip} 2>/dev/null"
)
end