Add sudo for redir

This commit is contained in:
guerremdq 2014-03-20 17:01:45 -03:00
parent 2e2c2fad56
commit fd948f8552
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ module Vagrant
redir_pids.each do |pid|
next unless is_redir_pid?(pid)
@logger.debug "Killing pid #{pid}"
system "pkill -TERM -P #{pid}"
system "sudo pkill -TERM -P #{pid}"
end
@logger.info "Removing redir pids files"

View file

@ -79,7 +79,7 @@ module Vagrant
params = %W( --lport=#{host_port} --caddr=#{guest_ip} --cport=#{guest_port} )
params.unshift "--laddr=#{host_ip}" if host_ip
params << '--syslog' if ENV['REDIR_LOG']
redir_cmd = "redir #{params.join(' ')} 2>/dev/null"
redir_cmd = "sudo redir #{params.join(' ')} 2>/dev/null"
@logger.debug "Forwarding port with `#{redir_cmd}`"
spawn redir_cmd