Bug#211096: patch to make update-grub work with LABELs in fstab

Jason Thomas Jason Thomas <jason@debian.org>, 211096@bugs.debian.org
Wed, 3 Nov 2004 12:03:58 +1100


tags 211096 + patch
thanks

The first patch sent from Thomas Nilsson is the way I would suggest doing it!

On Tue, Nov 02, 2004 at 12:56:00PM -0700, Scott Barker wrote:
> Package: grub
> Version: 0.95+cvs20040624-10
> Followup-For: Bug #211096
> 
> This patch will allow LABELs (and UUIDs) in the fstab to work with
> update-grub:
> 
> --- /sbin/update-grub.orig	2004-10-13 19:29:53.000000000 -0600
> +++ /sbin/update-grub	2004-11-02 12:48:48.000000000 -0700
> @@ -69,9 +69,14 @@
>  		device=`awk "$script" /etc/fstab`
>  	fi
>  
> -	if [ -n "$device" ] ; then
> +	case "$device" in
> +	/dev/* )
>  		device=`readlink -f "$device"`
> -	fi
> +		;;
> +	* )
> +		device=`findfs "$device"`
> +		;;
> +	esac
>  
>  	echo $device
>  }
> 
> -- System Information:
> Debian Release: 3.1
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: i386 (i686)
> Kernel: Linux 2.6.8
> Locale: LANG=en_CA, LC_CTYPE=en_CA
> 
> Versions of packages grub depends on:
> ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an
> ii  libncurses5                 5.4-4        Shared libraries for terminal hand
> 
> -- no debconf information

> --- /sbin/update-grub	2004-10-13 19:29:53.000000000 -0600
> +++ update-grub	2004-11-02 12:48:48.000000000 -0700
> @@ -69,9 +69,14 @@
>  		device=`awk "$script" /etc/fstab`
>  	fi
>  
> -	if [ -n "$device" ] ; then
> +	case "$device" in
> +	/dev/* )
>  		device=`readlink -f "$device"`
> -	fi
> +		;;
> +	* )
> +		device=`findfs "$device"`
> +		;;
> +	esac
>  
>  	echo $device
>  }


-- 
Jason

"I hope you learn speaking English proper I hope speak I me you."
     -- Branden Robinson, 2001