nfs: avoid adding extra newlines to /etc/exports
StringBlockEditor already adds the necessary newlines. That extra newline was making /etc/exports longer and longer, full of empty lines, because StringBlockEditor doesn't know about it and does not remove it.
This commit is contained in:
parent
51ceda7e25
commit
4fd2373753
|
@ -77,7 +77,7 @@ module VagrantPlugins
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
|
||||||
nfs_cleanup("#{Process.uid} #{id}")
|
nfs_cleanup("#{Process.uid} #{id}")
|
||||||
output = "#{nfs_exports_content}\n#{output}"
|
output = nfs_exports_content + output
|
||||||
nfs_write_exports(output)
|
nfs_write_exports(output)
|
||||||
|
|
||||||
if nfs_running?(nfs_check_command)
|
if nfs_running?(nfs_check_command)
|
||||||
|
|
|
@ -188,7 +188,7 @@ EOH
|
||||||
:linux__nfs_options=>["rw","all_squash"]}}
|
:linux__nfs_options=>["rw","all_squash"]}}
|
||||||
valid_id = SecureRandom.uuid
|
valid_id = SecureRandom.uuid
|
||||||
content =<<-EOH
|
content =<<-EOH
|
||||||
\n# VAGRANT-BEGIN: #{Process.uid} #{valid_id}
|
# VAGRANT-BEGIN: #{Process.uid} #{valid_id}
|
||||||
"/home/vagrant" 127.0.0.1(rw,all_squash,anonuid=,anongid=,fsid=)
|
"/home/vagrant" 127.0.0.1(rw,all_squash,anonuid=,anongid=,fsid=)
|
||||||
"/newhome/otherproject" 127.0.0.1(rw,all_squash,anonuid=,anongid=,fsid=)
|
"/newhome/otherproject" 127.0.0.1(rw,all_squash,anonuid=,anongid=,fsid=)
|
||||||
# VAGRANT-END: #{Process.uid} #{valid_id}
|
# VAGRANT-END: #{Process.uid} #{valid_id}
|
||||||
|
|
Loading…
Reference in New Issue