* "Yoshinori K. Okuji" <[EMAIL PROTECTED]> [2002-05-16T11:06+0900]:
> Ah, I forgot that case. Thanks for the report.
> 
> But I don't think Michael's fix is right, since the grub shell uses
> the last entry instead of the first entry. So I'll do a better
> fix. Jason, give me some time.

Ah ok, didn't know that.  This one takes the last occurence:

Index: grub-install.in
===================================================================
RCS file: /home/michaelw/data/cvs/debian/grub/util/grub-install.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 grub-install.in
--- grub-install.in     6 Apr 2002 22:30:18 -0000       1.1.1.2
+++ grub-install.in     16 May 2002 09:17:49 -0000
@@ -121,8 +121,7 @@
     esac
 
     # Get the drive name.
-    tmp_drive=`grep -v '^#' $device_map | grep "$tmp_disk *$" \
-       | sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%'`
+    tmp_drive="$(sed -n -e 
+"\%^[[:space:]]*\(([hf]d[0-9][a-g0-9,]*)\)[[:space:]]\+${tmp_disk}\b.*%{s//\1/;h;};\${x;/^\$/!p;}"
+ "$device_map")"
 
     # If not found, print an error message and exit.
     if test "x$tmp_drive" = x; then
===================================================================

Basically, it copies the matching part to the hold space (overwriting
any previous match), and after the last line prints the hold space unless
it's empty.


Cheers,
M/

_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to