summaryrefslogtreecommitdiff
path: root/scripts/vyatta-grub-setup
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-04-10 10:11:53 -0700
committerStephen Hemminger <shemminger@vyatta.com>2009-04-10 10:11:53 -0700
commita21b41934a20542aeb602cb5f7276e2622e22888 (patch)
tree0b92de959ff3736926ada9906dcbb6a1a2e51cfd /scripts/vyatta-grub-setup
parentc8ddc562aea00044ce3bc3867858e0bc4bd461df (diff)
parent29b0a0a2eb2d30a74a65c496a0d7614e141e5fed (diff)
downloadvyatta-cfg-quagga-a21b41934a20542aeb602cb5f7276e2622e22888.tar.gz
vyatta-cfg-quagga-a21b41934a20542aeb602cb5f7276e2622e22888.zip
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-cfg-system into jenner
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)\" {"