guests/linux: only successful mount if exit status 0
This commit is contained in:
parent
138024d74c
commit
62e357ffcd
|
@ -12,6 +12,8 @@ BUG FIXES:
|
||||||
in the installer context. [GH-2231]
|
in the installer context. [GH-2231]
|
||||||
- core: Clear `DYLD_LIBRARY_PATH` on Mac if the subprocess is executing
|
- core: Clear `DYLD_LIBRARY_PATH` on Mac if the subprocess is executing
|
||||||
a setuid or setgid script. [GH-2243]
|
a setuid or setgid script. [GH-2243]
|
||||||
|
- guests/linux: Don't raise exception right away if mounting fails, allow
|
||||||
|
retries. [GH-2234]
|
||||||
- hosts/arch: Vagrant won't crash on Arch anymore. [GH-2233]
|
- hosts/arch: Vagrant won't crash on Arch anymore. [GH-2233]
|
||||||
|
|
||||||
## 1.3.3 (September 18, 2013)
|
## 1.3.3 (September 18, 2013)
|
||||||
|
|
|
@ -28,17 +28,19 @@ module VagrantPlugins
|
||||||
success = true
|
success = true
|
||||||
|
|
||||||
mount_commands.each do |command|
|
mount_commands.each do |command|
|
||||||
machine.communicate.sudo(command) do |type, data|
|
no_such_device = false
|
||||||
success = false if type == :stderr && data =~ /No such device/i
|
status = machine.communicate.sudo(command, error_check: false) do |type, data|
|
||||||
|
no_such_device = true if type == :stderr && data =~ /No such device/i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
success = status == 0 && !no_such_device
|
||||||
break if success
|
break if success
|
||||||
end
|
end
|
||||||
|
|
||||||
break if success
|
break if success
|
||||||
|
|
||||||
attempts += 1
|
attempts += 1
|
||||||
raise Vagrant::Errors::LinuxMountFailed, :command => mount_command
|
raise Vagrant::Errors::LinuxMountFailed, :command => mount_commands.join("\n")
|
||||||
sleep 2
|
sleep 2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue