]> xenbits.xensource.com Git - people/gdunlap/raisin.git/.git/commitdiff
Add Xen to Grub config
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 20 Mar 2015 16:45:26 +0000 (16:45 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 20 Mar 2015 16:45:26 +0000 (16:45 +0000)
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen.sh

diff --git a/xen.sh b/xen.sh
index 0d6dcbe571c9094b7b67e077d2d51a2e6b880889..8e7b143356f16c3e1cc804bd9b71d220777400fe 100644 (file)
--- a/xen.sh
+++ b/xen.sh
@@ -102,7 +102,20 @@ function xen_create_bridge_Fedora() {
     $SUDO service network start
 }
 
+function xen_update_bootloader_Debian() {
+    grub-mkconfig
+}
+
+function xen_update_bootloader_Fedora() {
+    TMPFILE=`mktemp`
+    cat /boot/grub/grub.conf | \
+      sed -e 's,kernel,multiboot /boot/xen.gz placeholder\n\tmodule,g' | \
+      sed -e 's/initrd/module/g' > $TMPFILE
+    $SUDO mv -f $TMPFILE /boot/grub/grub.conf
+}
+
 function xen_configure() {
     xen_create_bridge_$DISTRO
     start_initscripts xencommons xendomains xen-watchdog
+    xen_update_bootloader_$DISTRO
 }