Fix code indentation

This commit is contained in:
Fabio Rehm 2014-05-03 23:28:04 -03:00
parent ee63d2b2ae
commit 84bdb5cb22
2 changed files with 10 additions and 10 deletions

View file

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

View file

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