* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Use UUID when possible.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-21 01:02:24 +02:00
parent ade9bd6642
commit 3e0fa5d0e0
2 changed files with 14 additions and 1 deletions

View file

@ -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.

View 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"`