#!/bin/sh # # This script is designed to setup the kernel and ramdisk inside # the xen-tools configuration file; and also update any stored values # in any pre-generated Xen guests. # # This is useful if you have upgraded your Xen kernel. # # Steve # -- # # # Find the kernel to use, and the ramdisk, unless they are specified # in the environment. # if [ -z "${kernel}" ]; then kernel=`ls -1 /boot| grep ^vm| grep -v syms| grep xen | sort -r| head -n 1` kernel="/boot/${kernel}" fi if [ -z "${ramdisk}" ]; then ramdisk=`ls -1 /boot| grep ^init| grep xen| sort -r| head -n 1` ramdisk="/boot/${ramdisk}" fi # # Abort if we didn't find a kernel / ramdisk # if [ -z "${kernel}" ]; then echo "Failed to find Xen kernel." exit fi if [ -z "${ramdisk}" ]; then echo "Failed to find Xen ramdisk." exit fi # # Show what we're going to do - and prompt for confirmation. # cat <