grub-mkconfig: If $hints is not set reduce the output into grub.cfg to just 1 line
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
c55480daca
commit
3ec59f14f4
1 changed files with 9 additions and 5 deletions
|
@ -158,11 +158,15 @@ prepare_grub_to_access_device ()
|
||||||
fi
|
fi
|
||||||
if [ "x${GRUB_DISABLE_UUID}" != "xtrue" ] && fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
|
if [ "x${GRUB_DISABLE_UUID}" != "xtrue" ] && fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
|
||||||
hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints=
|
hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints=
|
||||||
echo "if [ x\$feature_platform_search_hint = xy ]; then"
|
if [ "x$hints" != x ]; then
|
||||||
echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
|
echo "if [ x\$feature_platform_search_hint = xy ]; then"
|
||||||
echo "else"
|
echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
|
||||||
echo " search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
echo "else"
|
||||||
echo "fi"
|
echo " search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
||||||
|
echo "fi"
|
||||||
|
else
|
||||||
|
echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
IFS="$old_ifs"
|
IFS="$old_ifs"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue