Skip to content

Commit

Permalink
Added the patch
Browse files Browse the repository at this point in the history
w
  • Loading branch information
azuer88 committed Oct 31, 2014
1 parent ff0f07b commit 5e33484
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions grub-use-labels.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- grub-mkconfig_lib.orig 2014-10-31 12:23:15.714520777 +0800
+++ grub-mkconfig_lib 2014-10-31 12:52:24.623122681 +0800
@@ -173,11 +173,18 @@
echo "set root='$fs_hint'"
fi
if fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
+ fs_label="`"${grub_probe}" --device $@ --target=fs_label 2> /dev/null`"
+ if [ "x${fs_label}" != "x" ]; then
+ search_opt="--label"
+ else
+ search_opt="--fs_uuid"
+ fs_label="${fs_uuid}"
+ fi
hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints=
echo "if [ x\$feature_platform_search_hint = xy ]; then"
- echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
+ echo " search --no-floppy ${search_opt} --set=root ${hints} ${fs_label}"
echo "else"
- echo " search --no-floppy --fs-uuid --set=root ${fs_uuid}"
+ echo " search --no-floppy ${search_opt} --set=root ${fs_label}"
echo "fi"
fi
IFS="$old_ifs"

0 comments on commit 5e33484

Please sign in to comment.