vagrant-vbguest-redhat-kernel-update 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8e3897106b414bce26564d069aed2d76b3eac3c
4
- data.tar.gz: 2ca364d3958cccb25b8854d6ce410ee3b708a409
3
+ metadata.gz: a54f397bbbc48d99b594be6f383f7e24c7a6b295
4
+ data.tar.gz: edbdb8f33c117f03e00aa11dfea12710853b5ace
5
5
  SHA512:
6
- metadata.gz: bbfcb754e197e01396edc8716bf05f115d0e8194ffd63aec5e8042b92bf1d30f8161b8f51835ff6fadc206ba199e42f323b460516bb769183bbc5c816e46aa79
7
- data.tar.gz: 26adf7a18feb25a3e9043e6e2bfb9fe1b8cb80249184785e3790d64715c664d26db639ac65d2a45b45e7bf4108a58e602f3a944d682232643a137f0887b7e0e1
6
+ metadata.gz: b7961d23bb3531e180f6b9908184d1751356f1192b8a196d78da37784cc30be64be23402c101aab3a87c83d14add729661fe474c099f8c72bc3b44467957c6b2
7
+ data.tar.gz: feff0b9ffd430950bbc034b9d3aac6f010fcf9b8398a3e53ccbdd38e44df7ea023410d9d381a0c51206b96a9b8b0d9ce46083fb2f2d41160b1d5c3e5c99c27b9
@@ -12,21 +12,18 @@ module VagrantVbguestRedHatKernelUpdate
12
12
  # really old versions of the guest additions (4.2.6) fail to
13
13
  # remove the vboxguest module from the running kernel, which
14
14
  # makes the loading of the newer vboxsf module fail.
15
- # The newer init scripts seem to do it just fine, so we'll just
16
- # use them to get this working
17
- restart_additions(opts, &block)
15
+ # Well just reboot the VM to make sure the latest modules are loaded
16
+ @vm.ui.warn "Rebooting to ensure guest additions are loaded"
17
+ reboot(@vm, {:auto_reboot => true})
18
18
  end
19
19
 
20
20
  protected
21
21
 
22
- def restart_additions(opts=nil, &block)
23
- # TODO appropriate restart with systemd
24
- communicate.sudo("[[ -f /etc/init.d/vboxadd ]] && /etc/init.d/vboxadd restart || :", opts, &block)
25
- end
26
-
27
22
  # TODO submit MR to have this in upstream
28
23
  def dependency_list
29
24
  packages = [
25
+ 'kernel-devel-`uname -r`',
26
+ 'kernel-headers-`uname -r`',
30
27
  'gcc',
31
28
  'binutils',
32
29
  'make',
@@ -45,15 +42,13 @@ module VagrantVbguestRedHatKernelUpdate
45
42
 
46
43
  if exit_status == 100 then
47
44
  upgrade_kernel(opts, &block)
48
- else
49
- communicate.sudo("yum -y install kernel-{devel,headers}")
50
45
  end
51
46
  end
52
47
 
53
48
  def upgrade_kernel(opts=nil, &block)
54
- @env.ui.warn("Attempting to upgrade the kernel")
49
+ @vm.ui.warn("Attempting to upgrade the kernel")
55
50
  communicate.sudo("yum -y upgrade kernel{,-devel,-headers}", opts, &block)
56
- @env.ui.warn("Restarting to activate upgraded kernel")
51
+ @vm.ui.warn("Restarting to activate upgraded kernel")
57
52
 
58
53
  # should work from what I can tell, but doesn't :(
59
54
  #vm.action(:reload, {});
@@ -81,7 +76,7 @@ module VagrantVbguestRedHatKernelUpdate
81
76
  end
82
77
  # this is not ideal - we're just grabbing the bits we need to allow this to work
83
78
  @env.action_runner().run(simple_reboot, {
84
- :ui => @env.ui,
79
+ :ui => vm.ui,
85
80
  :machine => vm,
86
81
  })
87
82
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantVbguestRedHatKernelUpdate
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Sharpe