guests/freebsd: style

This commit is contained in:
Mitchell Hashimoto 2014-06-12 11:38:53 -07:00
parent dec2760465
commit 4d76327382
1 changed files with 5 additions and 6 deletions

View File

@ -7,14 +7,13 @@ module VagrantPlugins
machine.communicate.execute("uname -r") do |type, result| machine.communicate.execute("uname -r") do |type, result|
version = result.split('.')[0].to_i if type == :stdout version = result.split('.')[0].to_i if type == :stdout
end end
if version >= 10
pkg_cmd = "pkg install -y"
else
pkg_cmd = "pkg_add -r" pkg_cmd = "pkg_add -r"
if version && version >= 10
pkg_cmd = "pkg install -y"
end end
machine.communicate.tap do |comm|
comm.sudo(pkg_cmd+" rsync") machine.communicate.sudo("#{pkg_cmd} rsync")
end
end end
def self.rsync_installed(machine) def self.rsync_installed(machine)