Upgrade VB dev boxes kernel when provisioning

This commit is contained in:
Fabio Rehm 2013-03-09 16:17:03 -03:00
parent 42a448666a
commit ccb592d448
3 changed files with 19 additions and 0 deletions

View file

@ -24,6 +24,8 @@ Vagrant::Config.run do |config|
config.vbguest.no_remote = true
end
config.vm.provision :shell, :path => 'shell-provisioning/upgrade-kernel'
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "."
puppet.manifest_file = "site.pp"

View file

@ -25,6 +25,8 @@ Vagrant::Config.run do |config|
config.vbguest.no_remote = true
end
config.vm.provision :shell, :path => 'shell-provisioning/upgrade-kernel'
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "."
puppet.manifest_file = "site.pp"

View file

@ -0,0 +1,15 @@
#!/bin/bash
set -e
if [[ `uname -r` != "3.5.0-17-generic" ]]; then
exit 0
fi
echo 'An old kernel was found on the guest machine and it will be upgraded' 1>&2
echo 'Please reload the box after provisioning when finished' 1>&2
sudo apt-get update
sudo apt-get install linux-image-3.5.0-25-generic linux-headers-3.5.0-25-generic -y
sudo apt-get dist-upgrade -y
sudo apt-get clean
sudo apt-get autoremove -y