bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Bug#147109: grub: improved error handling for erroneous


From: Jason Thomas
Subject: address@hidden: Bug#147109: grub: improved error handling for erroneous device.map]
Date: Thu, 16 May 2002 11:13:04 +1000
User-agent: Mutt/1.3.28i

Thanks Michael.

Hi all, Michael sent me this patch can someone familaur with this code
check it out and either commit it or let me know and I can.

Either way let me know and I'll patch the debian package too.

Thanks.

----- Forwarded message from Michael Weber <address@hidden> -----

> Date: Wed, 15 May 2002 22:19:06 +0200
> From: Michael Weber <address@hidden>
> To: Debian Bug Tracking System <address@hidden>
> Subject: Bug#147109: grub: improved error handling for erroneous device.map
> 
> Package: grub
> Version: 0.92-1
> Severity: normal
> Tags: patch
> 
> Hi,
> 
> grub-install doesn't handle duplicate entries in device.map for one
> harddisk particularly well currently.  It just dies when executing
> grub.
> 
> The following patch improves this a bit, by taking only the first
> found device (and also gets rid of 2 unnecessary calls to grep :))...
> 
> 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   15 May 2002 20:02:57 -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/;p;q;}"
>  "$device_map")"
>  
>      # If not found, print an error message and exit.
>      if test "x$tmp_drive" = x; then
> ===================================================================
> 
> 
> Cheers,
> Michael
>      
> -- System Information
> Debian Release: 3.0
> Architecture: i386
> Kernel: Linux stargate 2.4.18 #1 SMP Sun Mar 17 23:04:54 CET 2002 i686
> Locale: LANG=POSIX, address@hidden
> 
> Versions of packages grub depends on:
> ii  libc6                    2.2.5-3         GNU C Library: Shared libraries 
> an
> ii  libncurses5              5.2.20020112a-3 Shared libraries for terminal 
> hand
> 

----- End forwarded message -----

-- 
Jason Thomas                           Phone:  +61 2 6257 7111
System Administrator  -  UID 0         Fax:    +61 2 6257 7311
tSA Consulting Group Pty. Ltd.         Mobile: 0418 29 66 81
1 Hall Street Lyneham ACT 2602         http://www.topic.com.au/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]