From 84bdb5cb22a69c27a89d5cfca714242d9539dd0c Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 3 May 2014 23:28:04 -0300 Subject: [PATCH] Fix code indentation --- lib/vagrant-lxc/action/clear_forwarded_ports.rb | 10 +++++----- lib/vagrant-lxc/action/forward_ports.rb | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/vagrant-lxc/action/clear_forwarded_ports.rb b/lib/vagrant-lxc/action/clear_forwarded_ports.rb index bf6d1b3..e8cf7c1 100644 --- a/lib/vagrant-lxc/action/clear_forwarded_ports.rb +++ b/lib/vagrant-lxc/action/clear_forwarded_ports.rb @@ -15,11 +15,11 @@ module Vagrant redir_pids.each do |pid| next unless is_redir_pid?(pid[0]) @logger.debug "Killing pid #{pid[0]}" - if pid[1] - system "sudo pkill -TERM -P #{pid[0]}" - else - system "pkill -TERM -P #{pid[0]}" - end + if pid[1] + system "sudo pkill -TERM -P #{pid[0]}" + else + system "pkill -TERM -P #{pid[0]}" + end end @logger.info "Removing redir pids files" diff --git a/lib/vagrant-lxc/action/forward_ports.rb b/lib/vagrant-lxc/action/forward_ports.rb index afad40c..0d25da0 100644 --- a/lib/vagrant-lxc/action/forward_ports.rb +++ b/lib/vagrant-lxc/action/forward_ports.rb @@ -79,11 +79,11 @@ 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'] - if host_port < 1024 - redir_cmd = "sudo redir #{params.join(' ')} 2>/dev/null" - else - redir_cmd = "redir #{params.join(' ')} 2>/dev/null" - end + if host_port < 1024 + redir_cmd = "sudo redir #{params.join(' ')} 2>/dev/null" + else + redir_cmd = "redir #{params.join(' ')} 2>/dev/null" + end @logger.debug "Forwarding port with `#{redir_cmd}`" spawn redir_cmd end