Merge pull request #5954 from mitchellh/sethvargo/tmpdir
Fallback to /tmp if $TMPDIR is not set
This commit is contained in:
commit
639f22c4d0
|
@ -102,7 +102,8 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Use sed to just strip out the block of code which was inserted
|
# Use sed to just strip out the block of code which was inserted
|
||||||
# by Vagrant
|
# by Vagrant
|
||||||
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")
|
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")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.nfs_opts_setup(folders)
|
def self.nfs_opts_setup(folders)
|
||||||
|
|
Loading…
Reference in New Issue