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

Scott Barker Scott Barker <Scott_Barker@mtechIT.com>, 211096@bugs.debian.org
Tue, 02 Nov 2004 12:56:00 -0700


This is a multi-part MIME message sent by reportbug.

--===============0701282841==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0701282841==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="diffs"

--- /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
 }

--===============0701282841==--