2007-05-20 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in: New file. * DISTLIST: Add update-grub_lib.in. * conf/common.rmk: Generate update-grub_lib and install it in $(lib_DATA). * Makefile.in: Add install routine for $(lib_DATA). * util/grub.d/00_header.in: Use convert_system_path_to_grub_path() function provided by update-grub_lib to support arbitrary paths of unifont.pff. * util/update-grub.in: Use convert_system_path_to_grub_path() to initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
This commit is contained in:
parent
5beb22914d
commit
42c71976c6
7 changed files with 100 additions and 15 deletions
|
@ -17,6 +17,12 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St - Suite 330, Boston, MA 02110, USA.
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
|
||||
# for convert_system_path_to_grub_path()
|
||||
. ${libdir}/grub/update-grub_lib
|
||||
|
||||
if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
|
||||
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
|
||||
|
@ -27,13 +33,19 @@ set timeout=${GRUB_TIMEOUT}
|
|||
set root=${GRUB_DRIVE}
|
||||
EOF
|
||||
|
||||
if test -e /boot/grub/unifont.pff ; then
|
||||
cat << EOF
|
||||
# Prefer system path for space reasons (/boot/grub might be a very small
|
||||
# partition in case of OpenFirmware, etc).
|
||||
for i in /usr/share/grub/unifont.pff /boot/grub/unifont.pff ; do
|
||||
if test -e $i ; then
|
||||
grub_path=`convert_system_path_to_grub_path $i`
|
||||
cat << EOF
|
||||
|
||||
font ${GRUB_DRIVE_BOOT_GRUB}/unifont.pff
|
||||
font ${grub_path}
|
||||
set gfxmode=640x480
|
||||
insmod gfxterm
|
||||
insmod vbe
|
||||
terminal gfxterm
|
||||
EOF
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue