Ensure that aio build only adds a new kernel when required

Closes Bug: 1398895
Change-Id: Ib29abbd01bd79869396f75c9570aa4b24ad00612
This commit is contained in:
Jesse Pretorius
2014-12-03 16:49:33 +00:00
parent f8ca98fe70
commit 3df4548c95

View File

@@ -451,8 +451,11 @@ pushd /opt/ansible-lxc-rpc/rpc_deployment
install_bits infrastructure/rsyslog-config.yml
popd
if [ ! "$(dpkg -l | grep linux-image-extra-3.13.0-35-generic)" ];then
apt-get install -y linux-image-extra-3.13.0-35-generic
if ! modprobe vxlan; then
MINIMUM_KERNEL_VERSION=$(awk '/required_kernel/ {print $2}' /opt/ansible-lxc-rpc/rpc_deployment/inventory/group_vars/all.yml)
apt-get install -y linux-headers-${MINIMUM_KERNEL_VERSION} \
linux-image-${MINIMUM_KERNEL_VERSION} \
linux-image-extra-${MINIMUM_KERNEL_VERSION}
rm /etc/update-motd.d/*
cat > /etc/update-motd.d/00-rpc-notice<< EOF
#!/usr/bin/env bash