]> git.proxmox.com Git - grub2.git/commitdiff
* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Use UUID when possible.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 20 Sep 2010 23:02:24 +0000 (01:02 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 20 Sep 2010 23:02:24 +0000 (01:02 +0200)
ChangeLog
util/grub.d/10_kfreebsd.in

index 4fd29f1319ef97887adf4a3f3b04ecd3c872e3f6..3c57b6f767e5dabe94ac6b35f1ed658e8ba9571e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-20  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Use UUID when possible.
+
 2010-09-20  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub.d/20_linux_xen.in: Use submenus.
index e39423999d4b75fb473c4656035b9bbaf597e18a..591fbc4b1992da1289ee34c47548e0d2799c3c32 100644 (file)
@@ -144,7 +144,16 @@ while [ "x$list" != "x" ] ; do
                        # filesystem name (empty string for the main filesystem)
                        kfreebsd_device="${kfreebsd_device}$(grub-mkrelpath / | sed -e "s,/*@$,,")"
     ;;
-    *)                 kfreebsd_device=${GRUB_DEVICE} ;;
+    *)
+         kfreebsd_device=${kfreebsd_fs}id/${GRUB_DEVICE_UUID}
+         # Debian GNU/kFreeBSD can't remount root if it's supplied as UUID but
+         # as an UUID
+         if [ "x${GRUB_DISTRIBUTOR}" = "xDebian" ] \
+             && ! (cat /etc/fstab | awk '!/^[[:space:]]*#/ && $2=="/" { print $1; }' \
+             | grep "${kfreebsd_fs}id/${GRUB_DEVICE_UUID}" > /dev/null); then
+             kfreebsd_device=${GRUB_DEVICE} 
+         fi
+         ;;
   esac
 
   version=`echo $basename | sed -e "s,^[^0-9]*-,,g;s/\.gz$//g"`