Skip to content

Commit

Permalink
hosts/linux: sudo to copy back to exports [hashicorpGH-5957]
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jul 15, 2015
1 parent ce5a30b commit f26293b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ BUG FIXES:
- guests/redhat: systemd detection should happen on guest [GH-5948]
- guests/ubuntu: setting hostname fixed in 12.04 [GH-5937]
- hosts/linux: NFS can be configured without `$TMP` set on the host [GH-5954]
- hosts/linux: NFS will sudo copying back to `/etc/exports` [GH-5957]
- providers/virtulabox: remove UNC path conversion on Windows since it
caused mounting regressions [GH-5933]
- provisioners/puppet: Windows Puppet 4 paths work correctly [GH-5967]
Expand Down
2 changes: 1 addition & 1 deletion plugins/hosts/linux/cap/nfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def self.nfs_cleanup(id)
# Use sed to just strip out the block of code which was inserted
# by Vagrant
tmp = ENV["TMPDIR"] || ENV["TMP"] || "/tmp"
system("cp /etc/exports '#{tmp}' && #{sudo_command}sed -r -e '\\\x01^# VAGRANT-BEGIN:( #{user})? #{id}\x01,\\\x01^# VAGRANT-END:( #{user})? #{id}\x01 d' -ibak '#{tmp}/exports' ; cp '#{tmp}/exports' /etc/exports")
system("cp /etc/exports '#{tmp}' && #{sudo_command}sed -r -e '\\\x01^# VAGRANT-BEGIN:( #{user})? #{id}\x01,\\\x01^# VAGRANT-END:( #{user})? #{id}\x01 d' -ibak '#{tmp}/exports' ; #{sudo_command}cp '#{tmp}/exports' /etc/exports")
end

def self.nfs_opts_setup(folders)
Expand Down

0 comments on commit f26293b

Please sign in to comment.