Merge "Add downgrade kernel script"
This commit is contained in:
commit
91bea90f41
multi-node-aio/tools
15
multi-node-aio/tools/downgrade-all-VMs.sh
Normal file
15
multi-node-aio/tools/downgrade-all-VMs.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
#eg. KERNEL_VERSION="3.13.0-98"
|
||||
KERNEL_VERSION=${KERNEL_VERSION:-false}
|
||||
|
||||
if [[ "${KERNEL_VERSION}" = false ]]; then
|
||||
echo "Please setup the KERNEL_VERSION before running this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd ..
|
||||
source functions.rc
|
||||
for node in $(get_all_hosts); do
|
||||
ssh -q -t -o StrictHostKeyChecking=no 10.0.0.${node#*":"} KERNEL_VERSION="${KERNEL_VERSION}" 'bash -s' < tools/ubuntu-downgrade.sh
|
||||
done
|
16
multi-node-aio/tools/ubuntu-kernel-downgrade.sh
Executable file
16
multi-node-aio/tools/ubuntu-kernel-downgrade.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#eg. KERNEL_VERSION="3.13.0-98"
|
||||
KERNEL_VERSION=${KERNEL_VERSION:-false}
|
||||
|
||||
if [[ "${KERNEL_VERSION}" = false ]]; then
|
||||
echo "Please setup the KERNEL_VERSION before running this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo apt-get update
|
||||
sudo aptitude install -y linux-image-${KERNEL_VERSION}-generic \
|
||||
linux-headers-${KERNEL_VERSION} linux-image-extra-${KERNEL_VERSION}-generic
|
||||
|
||||
sudo sed -i "s/GRUB_DEFAULT=.*/GRUB_DEFAULT=\"Advanced options for Ubuntu>Ubuntu, with Linux ${KERNEL_VERSION}-generic\"/" /etc/default/grub
|
||||
sudo update-grub
|
||||
sudo reboot
|
Loading…
x
Reference in New Issue
Block a user