diff --git a/plugins/hosts/linux/cap/nfs.rb b/plugins/hosts/linux/cap/nfs.rb index bf10aff9ea1..a55d8acb2f2 100644 --- a/plugins/hosts/linux/cap/nfs.rb +++ b/plugins/hosts/linux/cap/nfs.rb @@ -102,7 +102,7 @@ def self.nfs_cleanup(id) # Use sed to just strip out the block of code which was inserted # by Vagrant - system("#{sudo_command}sed -r -e '\\\x01^# VAGRANT-BEGIN:( #{user})? #{id}\x01,\\\x01^# VAGRANT-END:( #{user})? #{id}\x01 d' -ibak /etc/exports") + system("cp /etc/exports $TMPDIR && #{sudo_command}sed -r -e '\\\x01^# VAGRANT-BEGIN:( #{user})? #{id}\x01,\\\x01^# VAGRANT-END:( #{user})? #{id}\x01 d' -ibak $TMPDIR/exports ; cp $TMPDIR/exports /etc/exports") end def self.nfs_opts_setup(folders)