[Lunar-commits] r14793 - moonbase/trunk/utils/grub/plugin.d

Auke Kok sofar at lunar-linux.org
Tue May 17 18:00:29 UTC 2005


Author: sofar
Date: 2005-05-17 18:00:28 +0000 (Tue, 17 May 2005)
New Revision: 14793

Modified:
   moonbase/trunk/utils/grub/plugin.d/bootloader-grub.plugin
Log:
So, at least we know how to count now.


Modified: moonbase/trunk/utils/grub/plugin.d/bootloader-grub.plugin
===================================================================
--- moonbase/trunk/utils/grub/plugin.d/bootloader-grub.plugin	2005-05-17 17:30:04 UTC (rev 14792)
+++ moonbase/trunk/utils/grub/plugin.d/bootloader-grub.plugin	2005-05-17 18:00:28 UTC (rev 14793)
@@ -28,9 +28,13 @@
         TARGET=$(echo $LINE | cut -d: -f2)
         REALTARGET=$(echo $LINE | cut -d: -f3)
         if echo $DEVICE | grep -q "disc" ; then
-             (( DISC++ ))
+        	(( DISC++ ))
+			PART=0
+			echo "hd$((DISC-1)):$TARGET:$REALTARGET:"
+		else
+			(( PART++ ))
+        	echo "hd$((DISC-1)),$((PART-1)):$TARGET:$REALTARGET:"
         fi
-        echo "hd$((DISC-1)),$(echo $DEVICE | sed -e 's/.*\///' -e 's/disc/0/' -e 's/part//'):$TARGET:$REALTARGET:"
     done | grep ":$(readlink -f $1):" | cut -d: -f1
 }
 
@@ -50,12 +54,11 @@
         # determine is BOOT is a separate partition:
         BOOTPART=$(grep "^/dev/" /etc/mtab | awk '($2 == "/boot"){print $1}')
         ROOTPART=$(grep "^/dev/" /etc/mtab | awk '($2 == "/"){print $1}')
+        GRUB_ROOT="($(map_device_to_grub $ROOTPART))"
         if [ -n "$BOOTPART" ]; then
             GRUB_BOOT=""
-            GRUB_ROOT="($(map_device_to_grub $BOOTPART))"
         else
             GRUB_BOOT="/boot"
-            GRUB_ROOT="($(map_device_to_grub $ROOTPART))"
         fi
         debug_msg "grub: Using GRUB_BOOT=\"$GRUB_BOOT\""
         debug_msg "grub: Using GRUB_ROOT=\"$GRUB_ROOT\""



More information about the Lunar-commits mailing list