[Lunar-commits] r23225 - lunar-iso/trunk/lunar-install/sbin

Auke Kok sofar at lunar-linux.org
Sun Feb 11 00:02:09 CET 2007


Author: sofar
Date: 2007-02-11 00:02:09 +0100 (Sun, 11 Feb 2007)
New Revision: 23225

Modified:
   lunar-iso/trunk/lunar-install/sbin/lunar-install
Log:
Scan for available bootloaders


Modified: lunar-iso/trunk/lunar-install/sbin/lunar-install
===================================================================
--- lunar-iso/trunk/lunar-install/sbin/lunar-install	2007-02-10 22:21:26 UTC (rev 23224)
+++ lunar-iso/trunk/lunar-install/sbin/lunar-install	2007-02-10 23:02:09 UTC (rev 23225)
@@ -23,6 +23,12 @@
 }
 
 
+pkg_avail()
+{
+	grep -q "^$1:" /.packages
+}
+
+
 msgbox()
 {
 	LINES=$(( ${#1} / 55 + 7 ))
@@ -1447,8 +1453,8 @@
 install_bootloader() {
 	while true ; do
 		BCOMMAND=`$DIALOG --title "Boot loader menu" --default-item "L" --item-help --menu "You will need a boot loader to start linux automatically when your computer boots. You can chose not to install a boot loader now, or pick one of the available boot loaders and options below. You can always change to the other boot loader later." 0 0 0 \
-		"L" "lilo" "Install lilo as boot loader" \
-		"G" "grub" "Install grub as boot loader" \
+		$(if pkg_avail lilo ; then echo "L" ; echo "lilo" ; echo "Install lilo as boot loader"; fi) \
+		$(if pkg_avail grub ; then echo "G" ; echo "grub" ; echo "Install grub as boot loader"; fi) \
 		"N" "none" "Do not install a boot loader"`
 
 		if [ $? != 0 ] ; then



More information about the Lunar-commits mailing list