vagrant-vbguest-redhat-kernel-update 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8e3897106b414bce26564d069aed2d76b3eac3c
|
|
4
|
+
data.tar.gz: 2ca364d3958cccb25b8854d6ce410ee3b708a409
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbfcb754e197e01396edc8716bf05f115d0e8194ffd63aec5e8042b92bf1d30f8161b8f51835ff6fadc206ba199e42f323b460516bb769183bbc5c816e46aa79
|
|
7
|
+
data.tar.gz: 26adf7a18feb25a3e9043e6e2bfb9fe1b8cb80249184785e3790d64715c664d26db639ac65d2a45b45e7bf4108a58e602f3a944d682232643a137f0887b7e0e1
|
|
@@ -20,7 +20,8 @@ module VagrantVbguestRedHatKernelUpdate
|
|
|
20
20
|
protected
|
|
21
21
|
|
|
22
22
|
def restart_additions(opts=nil, &block)
|
|
23
|
-
|
|
23
|
+
# TODO appropriate restart with systemd
|
|
24
|
+
communicate.sudo("[[ -f /etc/init.d/vboxadd ]] && /etc/init.d/vboxadd restart || :", opts, &block)
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
# TODO submit MR to have this in upstream
|
|
@@ -53,9 +54,37 @@ module VagrantVbguestRedHatKernelUpdate
|
|
|
53
54
|
@env.ui.warn("Attempting to upgrade the kernel")
|
|
54
55
|
communicate.sudo("yum -y upgrade kernel{,-devel,-headers}", opts, &block)
|
|
55
56
|
@env.ui.warn("Restarting to activate upgraded kernel")
|
|
56
|
-
|
|
57
|
+
|
|
58
|
+
# should work from what I can tell, but doesn't :(
|
|
59
|
+
#vm.action(:reload, {});
|
|
60
|
+
reboot(@vm, {:auto_reboot => true})
|
|
61
|
+
|
|
62
|
+
# hide this reboot from vbguest
|
|
63
|
+
#@@rebooted[ self.class.vm_id(vm) ] = false
|
|
57
64
|
end
|
|
58
65
|
|
|
66
|
+
# I have NFI why @vm.action(:reload) doesn't work!
|
|
67
|
+
# It's as though we can't hook into the action chain fully, and the result is
|
|
68
|
+
# there's a bogus check for the guest additions before the boot which causes
|
|
69
|
+
# failure
|
|
70
|
+
def reboot(vm, options)
|
|
71
|
+
simple_reboot = Vagrant::Action::Builder.new.tap do |b|
|
|
72
|
+
b.use Vagrant::Action::Builtin::Call, Vagrant::Action::Builtin::GracefulHalt, :poweroff, :running do |env2, b2|
|
|
73
|
+
if !env2[:result]
|
|
74
|
+
b2.use VagrantPlugins::ProviderVirtualBox::Action::ForcedHalt
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
b.use VagrantPlugins::ProviderVirtualBox::Action::Boot
|
|
78
|
+
if defined?(Vagrant::Action::Builtin::WaitForCommunicator)
|
|
79
|
+
b.use Vagrant::Action::Builtin::WaitForCommunicator, [:starting, :running]
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
# this is not ideal - we're just grabbing the bits we need to allow this to work
|
|
83
|
+
@env.action_runner().run(simple_reboot, {
|
|
84
|
+
:ui => @env.ui,
|
|
85
|
+
:machine => vm,
|
|
86
|
+
})
|
|
87
|
+
end
|
|
59
88
|
|
|
60
89
|
end
|
|
61
90
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-vbguest-redhat-kernel-update
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Sharpe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-12-
|
|
11
|
+
date: 2017-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: vagrant-vbguest
|