More permissive sed call on BSD hosts to prevent errors when cleaning nfs

Gnu sed -i option doesn't support a space between the option and the
backup extension.

On BSD hosts running GNU sed (for instance OSX with Macports), it cleaning
nfs shares couldn't happen.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
This commit is contained in:
Brice Figureau 2010-12-12 18:19:19 +01:00 committed by Mitchell Hashimoto
parent d0e3cf1210
commit bafb572b70
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ module Vagrant
if $?.to_i == 0 if $?.to_i == 0
# 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("sudo sed -e '/^# VAGRANT-BEGIN: #{env.vm.uuid}/,/^# VAGRANT-END: #{env.vm.uuid}/ d' -i bak /etc/exports") system("sudo sed -e '/^# VAGRANT-BEGIN: #{env.vm.uuid}/,/^# VAGRANT-END: #{env.vm.uuid}/ d' -ibak /etc/exports")
end end
end end
end end