2020-01-31 10:06:23 +01:00
|
|
|
From 86b44992811600404c8d967a6e74910396ff874e Mon Sep 17 00:00:00 2001
|
2016-04-12 19:31:48 +02:00
|
|
|
From: Antonio Terceiro <terceiro@softwarelivre.org>
|
|
|
|
Date: Tue, 3 Feb 2015 10:35:17 -0200
|
2020-02-05 17:37:59 +01:00
|
|
|
Subject: [PATCH 03/13] linux/cap/halt: don't wait for `shutdown -h now` to
|
2019-09-15 11:45:25 +02:00
|
|
|
finish
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
When running a Debian 8 lxc guest (with the vagrant-lxc plugin), which
|
|
|
|
has systemd as init system, `vagrant halt` will hang waiting for
|
|
|
|
`shutdown -h now` to return.
|
2017-08-31 21:03:29 +02:00
|
|
|
|
|
|
|
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
2016-04-12 19:31:48 +02:00
|
|
|
---
|
|
|
|
plugins/guests/linux/cap/halt.rb | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/plugins/guests/linux/cap/halt.rb b/plugins/guests/linux/cap/halt.rb
|
2017-08-31 21:03:29 +02:00
|
|
|
index 60dc5dde4..657636eaf 100644
|
2016-04-12 19:31:48 +02:00
|
|
|
--- a/plugins/guests/linux/cap/halt.rb
|
|
|
|
+++ b/plugins/guests/linux/cap/halt.rb
|
|
|
|
@@ -4,7 +4,7 @@ module VagrantPlugins
|
|
|
|
class Halt
|
|
|
|
def self.halt(machine)
|
|
|
|
begin
|
|
|
|
- machine.communicate.sudo("shutdown -h now")
|
|
|
|
+ machine.communicate.sudo("shutdown -h now &")
|
2017-03-12 20:03:16 +01:00
|
|
|
rescue IOError, Vagrant::Errors::SSHDisconnected
|
2016-04-12 19:31:48 +02:00
|
|
|
# Do nothing, because it probably means the machine shut down
|
|
|
|
# and SSH connection was lost.
|
2017-08-31 21:03:29 +02:00
|
|
|
--
|
2020-01-31 10:06:23 +01:00
|
|
|
2.25.0
|
2017-08-31 21:03:29 +02:00
|
|
|
|