Skip to content

Commit

Permalink
Merge pull request #5773 from willdurand/fix-sed
Browse files Browse the repository at this point in the history
guest/linux: Being able to edit a file does not mean you can write in its parent directory
  • Loading branch information
mitchellh committed Jul 6, 2015
2 parents 1570f98 + 6ff15fb commit a858035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/hosts/linux/cap/nfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a858035

Please sign in to comment.