From 6ec9e3e279149fe36340b9c2d5ea74170484d3b5 Mon Sep 17 00:00:00 2001 From: Jon Topper Date: Tue, 6 May 2014 12:24:35 +0100 Subject: [PATCH] Linux stuff now tested and working! --- plugins/hosts/linux/cap/nfs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/hosts/linux/cap/nfs.rb b/plugins/hosts/linux/cap/nfs.rb index 2c7ee7eeb..adcd97dc2 100644 --- a/plugins/hosts/linux/cap/nfs.rb +++ b/plugins/hosts/linux/cap/nfs.rb @@ -1,4 +1,5 @@ require "vagrant/util" +require "vagrant/util/shell_quote" require "vagrant/util/retryable" module VagrantPlugins @@ -38,9 +39,8 @@ module VagrantPlugins nfs_cleanup(id) output.split("\n").each do |line| - # This should only ask for administrative permission once, even - # though its executed in multiple subshells. - system(%Q[echo '#{line}' | sudo tee -a /etc/exports >/dev/null"]) + line = Vagrant::Util::ShellQuote.escape(line, "'") + system(%Q[echo '#{line}' | sudo tee -a /etc/exports >/dev/null]) end if nfs_running?(nfs_check_command)