[Debian-live-changes] r941 - dists/trunk/live-helper/helpers

Daniel Baumann daniel at alioth.debian.org
Thu Apr 5 19:29:42 UTC 2007


Author: daniel
Date: 2007-04-05 19:29:42 +0000 (Thu, 05 Apr 2007)
New Revision: 941

Modified:
   dists/trunk/live-helper/helpers/lh_binary_grub
   dists/trunk/live-helper/helpers/lh_binary_usb
Log:


Modified: dists/trunk/live-helper/helpers/lh_binary_grub
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_grub	2007-04-05 18:42:18 UTC (rev 940)
+++ dists/trunk/live-helper/helpers/lh_binary_grub	2007-04-05 19:29:42 UTC (rev 941)
@@ -172,24 +172,25 @@
 		fi
 	fi
 
-	case "${LIVE_BINARY_IMAGE}" in
-		iso)
-			# Copying grub
-			mkdir -p binary/boot/grub
-			cp chroot/usr/lib/grub/i386-pc/stage2_eltorito binary/boot/grub
-			cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
+	mkdir -p binary/boot/grub
+	cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
 
-			# Copying splash screen
-			if [ -n "${LIVE_GRUB_SPLASH}" ]
-			then
-				# FIXME
-				cp "${LIVE_GRUB_SPLASH}" binary/boot/grub
+	if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
+	then
+		cp chroot/usr/lib/grub/i386-pc/stage2_eltorito binary/boot/grub
+	fi
 
-				LIVE_SPLASH="splashimage /boot/grub/`basename ${LIVE_GRUB_SPLASH}`"
-			fi
+	# Copying splash screen
+	if [ -n "${LIVE_GRUB_SPLASH}" ]
+	then
+		# FIXME
+		cp "${LIVE_GRUB_SPLASH}" binary/boot/grub
 
-			# Configure grub templates
-			cat >> binary/boot/grub/menu.lst << EOF
+		LIVE_SPLASH="splashimage /boot/grub/`basename ${LIVE_GRUB_SPLASH}`"
+	fi
+
+	# Configure grub templates
+cat >> binary/boot/grub/menu.lst << EOF
 # This is a divider, added to separate the menu items below from the Debian
 # ones.
 title		Other:
@@ -199,10 +200,8 @@
 LIVE_MEMTEST
 EOF
 
-			sed -i -e "s#LIVE_SPLASH#${LIVE_SPLASH}#" -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
-			sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
-			;;
-	esac
+	sed -i -e "s#LIVE_SPLASH#${LIVE_SPLASH}#" -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
+	sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
 
 	if [ -n "${PACKAGES}" ]
 	then

Modified: dists/trunk/live-helper/helpers/lh_binary_usb
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_usb	2007-04-05 18:42:18 UTC (rev 940)
+++ dists/trunk/live-helper/helpers/lh_binary_usb	2007-04-05 19:29:42 UTC (rev 941)
@@ -60,8 +60,13 @@
 			PACKAGES="${PACKAGES} parted"
 		fi
 
-		if [ ! -f chroot/usr/bin/syslinux ]
+		if [ "${LIVE_BOOTLOADER}" = "grub" ] && [ ! -f chroot/usr/sbin/grub ]
 		then
+			PACKAGES="${PACKAGES} grub"
+		fi
+
+		if [ "${LIVE_BOOTLOADER}" = "syslinux" ] && [ ! -f chroot/usr/bin/syslinux ]
+		then
 			PACKAGES="${PACKAGES} syslinux"
 		fi
 
@@ -104,7 +109,17 @@
 		Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true
 		Chroot "parted -s ${FREELO} set 1 boot on" || true
 		Chroot "parted -s ${FREELO} set 1 lba off" || true
-		cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
+
+		case "${LIVE_BOOTLOADER}" in
+			grub)
+				Chroot "grub-install --no-floppy ${FREELO}"
+				;;
+
+			syslinux)
+				cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
+				;;
+		esac
+
 		${LH_LOSETUP} -d ${FREELO}
 
 		lh_losetup $FREELO binary.img 1




More information about the Debian-live-changes mailing list