2009-04-13 Felix Zielcke <fzielcke@z-51.de>
* util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints doestn't exist. Check also for /boot/kernel/kernel.gz. Print `freebsd_loadenv' only when devices.hints exist.
This commit is contained in:
parent
232a769cb2
commit
a547a745a6
2 changed files with 22 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-04-13 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
|
||||
doestn't exist. Check also for /boot/kernel/kernel.gz. Print
|
||||
`freebsd_loadenv' only when devices.hints exist.
|
||||
|
||||
2009-04-13 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
|
||||
|
|
|
@ -21,15 +21,16 @@ exec_prefix=@exec_prefix@
|
|||
libdir=@libdir@
|
||||
. ${libdir}/grub/grub-mkconfig_lib
|
||||
|
||||
devices=/boot/devices.hints
|
||||
if ! test -e ${devices} ; then
|
||||
# not FreeBSD
|
||||
exit 0
|
||||
if test -e /boot/devices.hints ; then
|
||||
devices=/boot/devices.hints
|
||||
fi
|
||||
|
||||
if test -e /boot/kernel/kernel ; then
|
||||
kfreebsd=/boot/kernel/kernel
|
||||
fi
|
||||
if test -e /boot/kernel/kernel.gz ; then
|
||||
kfreebsd=/boot/kernel/kernel.gz
|
||||
fi
|
||||
|
||||
if [ "x$kfreebsd" != "x" ] ; then
|
||||
echo "Found kernel of FreeBSD: $kfreebsd" >&2
|
||||
|
@ -38,9 +39,11 @@ if [ "x$kfreebsd" != "x" ] ; then
|
|||
kfreebsd_dirname=`dirname $kfreebsd`
|
||||
kfreebsd_rel_dirname=`make_system_path_relative_to_its_root $kfreebsd_dirname`
|
||||
|
||||
if [ x"$devices" != "x" ] ; then
|
||||
devices_basename=`basename $devices`
|
||||
devices_dirname=`dirname $devices`
|
||||
devices_rel_dirname=`make_system_path_relative_to_its_root $devices_dirname`
|
||||
fi
|
||||
|
||||
root_device=`basename ${GRUB_DEVICE}`
|
||||
|
||||
|
@ -53,7 +56,13 @@ EOF
|
|||
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
||||
cat << EOF
|
||||
freebsd ${kfreebsd_rel_dirname}/${kfreebsd_basename}
|
||||
EOF
|
||||
|
||||
if [ x"$devices" != "x" ] ; then
|
||||
cat << EOF
|
||||
freebsd_loadenv ${devices_rel_dirname}/${devices_basename}
|
||||
EOF
|
||||
cat << EOF
|
||||
set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${root_device}
|
||||
}
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue