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
|
@ -22,6 +22,7 @@ transform="@program_transform_name@"
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
sbindir=@sbindir@
|
||||
libdir=@libdir@
|
||||
sysconfdir=@sysconfdir@
|
||||
grub_prefix=`echo /boot/grub | sed ${transform}`
|
||||
grub_cfg=${grub_prefix}/grub.cfg
|
||||
|
@ -30,6 +31,9 @@ update_grub_dir=${sysconfdir}/grub.d
|
|||
grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
|
||||
grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
|
||||
|
||||
# for convert_system_path_to_grub_path()
|
||||
. ${libdir}/grub/update-grub_lib
|
||||
|
||||
if [ "x$UID" = "x" ] ; then
|
||||
UID=`id -u`
|
||||
fi
|
||||
|
@ -76,18 +80,10 @@ GRUB_FS="`grub-probe --target=fs /`"
|
|||
GRUB_DRIVE="`grub-probe --target=drive /`"
|
||||
|
||||
# GRUB path to /boot
|
||||
if [ "x`stat -c %d /`" = "x`stat -c %d /boot/`" ] ; then
|
||||
GRUB_DRIVE_BOOT="${GRUB_DRIVE}/boot"
|
||||
else
|
||||
GRUB_DRIVE_BOOT="`grub-probe --target=drive /boot`"
|
||||
fi
|
||||
GRUB_DRIVE_BOOT="`convert_system_path_to_grub_path /boot`"
|
||||
|
||||
# GRUB path to /boot/grub
|
||||
if [ "x`stat -c %d /boot`" = "x`stat -c %d /boot/grub`" ] ; then
|
||||
GRUB_DRIVE_BOOT_GRUB="${GRUB_DRIVE_BOOT}/grub"
|
||||
else
|
||||
GRUB_DRIVE_BOOT_GRUB="`grub-probe --target=drive /boot/grub`"
|
||||
fi
|
||||
GRUB_DRIVE_BOOT_GRUB="`convert_system_path_to_grub_path /boot/grub`"
|
||||
|
||||
if test -f ${sysconfdir}/default/grub ; then
|
||||
. ${sysconfdir}/default/grub
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue