summaryrefslogtreecommitdiff
path: root/scripts/vyatta-grub-setup
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2009-04-09 13:48:52 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2009-04-09 13:48:52 -0700
commita51df7e17324d080a743e33504e379fbb7dbd580 (patch)
treead80b2c0c86fd4840ee5f88c8e6d2e357a673467 /scripts/vyatta-grub-setup
parentcb73cac112b425099c56d7bfaf81ef00efb5a913 (diff)
downloadvyatta-cfg-quagga-a51df7e17324d080a743e33504e379fbb7dbd580.tar.gz
vyatta-cfg-quagga-a51df7e17324d080a743e33504e379fbb7dbd580.zip
fix xen kernel handling for union install
Diffstat (limited to 'scripts/vyatta-grub-setup')
-rwxr-xr-xscripts/vyatta-grub-setup23
1 files changed, 22 insertions, 1 deletions
diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup
index e3438ec8..4ac8cd92 100755
--- a/scripts/vyatta-grub-setup
+++ b/scripts/vyatta-grub-setup
@@ -89,7 +89,16 @@ fi
if eval "$UNION"; then
GRUB_OPTIONS="boot=live live-media-path=/boot/$livedir module=$livedir quiet persistent noautologin nonetworking nouser hostname=vyatta"
- union_kernel_versions=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz-* 2> /dev/null | grep -v xen | awk -F/ '{ print $6 }' | sed 's/vmlinuz//g' | sort -r)
+ union_xen_kernel_version=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz*-xen* \
+ 2>/dev/null \
+ | awk -F/ '{ print $6 }' \
+ | sed 's/vmlinuz//g' | sort -r)
+ union_xen_version=$(ls $ROOTFSDIR/boot/$livedir/xen-*.gz 2> /dev/null \
+ | head -1 | awk -F/ '{ print $6 }' | sort -r)
+ union_kernel_versions=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz-* \
+ 2> /dev/null | grep -v xen \
+ | awk -F/ '{ print $6 }' | sed 's/vmlinuz//g' \
+ | sort -r)
else
# Read UUID off of filesystem and use it to tell GRUB where to mount drive
# This allows device to move around and grub will still find it
@@ -177,6 +186,18 @@ fi
done
fi
+ if [ -n "$union_xen_kernel_version" ]; then
+ for xversion in $union_xen_kernel_version; do
+ echo
+ echo
+ echo -e "menuentry \"Vyatta Xen linux$xversion dom0\" {"
+ echo -e "\tmultiboot /boot/$livedir/$union_xen_version "
+ echo -e "\tmodule /boot/$livedir/vmlinuz$xversion $GRUB_OPTIONS $vga_logo $vty_console"
+ echo -e "\tmodule /boot/$livedir/initrd.img$xversion"
+ echo -e "}"
+ done
+ fi
+
if [ -f "$ROOTFSDIR/boot/vmlinuz" ] && ! eval $UNION ; then
# Set first system boot option. Make KVM the default console in this one.
echo -e "menuentry \"Vyatta (KVM console)\" {"