merge with Trunk
This commit is contained in:
commit
a239a5e9cc
8 changed files with 198 additions and 58 deletions
53
ChangeLog
53
ChangeLog
|
@ -1,3 +1,56 @@
|
||||||
|
2009-11-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* util/getroot.c [__GNU__]: Include <hurd.h>, <hurd/lookup.h>, and
|
||||||
|
<hurd/fs.h>
|
||||||
|
[__GNU__] (grub_guess_root_device): Call file_name_lookup and
|
||||||
|
file_get_storage_info to implement grub_guess_root_device.
|
||||||
|
|
||||||
|
2009-11-21 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Print an error and usage if output option
|
||||||
|
has not been given.
|
||||||
|
|
||||||
|
2009-11-21 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
Patch from Loïc Minier <loic.minier@ubuntu.com>.
|
||||||
|
* util/grub.d/30_os-prober.in: Cope with Linux entries where
|
||||||
|
root and /boot are on different devices.
|
||||||
|
|
||||||
|
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Fix build for srcdir != objdir.
|
||||||
|
|
||||||
|
* Makefile.in (po/$(PACKAGE).pot): Rename to ...
|
||||||
|
($(srcdir)/po/$(PACKAGE).pot): ... this. Run $(XGETTEXT) from
|
||||||
|
$(srcdir).
|
||||||
|
($(foreach lang, $(LINGUAS), po/$(lang).po)): Rename to ...
|
||||||
|
($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): ... this. Use $^
|
||||||
|
reference for input.
|
||||||
|
|
||||||
|
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Use source directory direcly (without copiing
|
||||||
|
or hardlinking it). Remove -J option, Joliet is not compatible with
|
||||||
|
multiple source directories.
|
||||||
|
|
||||||
|
2009-11-21 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
2009-11-21 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Recognize `--override-directory' option.
|
||||||
|
(process_input_dir): New function. Process an arbitrary input
|
||||||
|
directory.
|
||||||
|
Misc adjustments to support both "override mode" and system-wide mode.
|
||||||
|
|
||||||
|
2009-11-20 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* configure.ac (UNIFONT_BDF): Rename to ...
|
||||||
|
(FONT_SOURCE): ... this. Update all users.
|
||||||
|
|
||||||
|
2009-11-20 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* configure.ac: Add `/usr/share/fonts/X11/misc/unifont.pcf.gz'
|
||||||
|
to the list of unifont files to look for.
|
||||||
|
|
||||||
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
Patch from Joe Auricchio <jauricchio@gmail.com>
|
Patch from Joe Auricchio <jauricchio@gmail.com>
|
||||||
|
|
22
Makefile.in
22
Makefile.in
|
@ -108,7 +108,7 @@ AWK = @AWK@
|
||||||
LIBCURSES = @LIBCURSES@
|
LIBCURSES = @LIBCURSES@
|
||||||
LIBUSB = @LIBUSB@
|
LIBUSB = @LIBUSB@
|
||||||
YACC = @YACC@
|
YACC = @YACC@
|
||||||
UNIFONT_BDF = @UNIFONT_BDF@
|
FONT_SOURCE = @FONT_SOURCE@
|
||||||
|
|
||||||
# Options.
|
# Options.
|
||||||
enable_grub_emu = @enable_grub_emu@
|
enable_grub_emu = @enable_grub_emu@
|
||||||
|
@ -207,7 +207,7 @@ docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi
|
||||||
$(MKDIR_P) docs
|
$(MKDIR_P) docs
|
||||||
-$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@
|
-$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@
|
||||||
|
|
||||||
ifeq (, $(UNIFONT_BDF))
|
ifeq (, $(FONT_SOURCE))
|
||||||
else
|
else
|
||||||
|
|
||||||
ifeq ($(enable_grub_mkfont),yes)
|
ifeq ($(enable_grub_mkfont),yes)
|
||||||
|
@ -218,11 +218,11 @@ pkgdata_DATA += unicode.pf2 ascii.pf2
|
||||||
UNICODE_ARROWS=0x2190-0x2193
|
UNICODE_ARROWS=0x2190-0x2193
|
||||||
UNICODE_LINES=0x2501-0x251B
|
UNICODE_LINES=0x2501-0x251B
|
||||||
|
|
||||||
unicode.pf2: $(UNIFONT_BDF) grub-mkfont
|
unicode.pf2: $(FONT_SOURCE) grub-mkfont
|
||||||
$(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF)
|
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE)
|
||||||
|
|
||||||
ascii.pf2: $(UNIFONT_BDF) grub-mkfont
|
ascii.pf2: $(FONT_SOURCE) grub-mkfont
|
||||||
$(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
|
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -472,12 +472,12 @@ gensymlist.sh: gensymlist.sh.in config.status
|
||||||
genkernsyms.sh: genkernsyms.sh.in config.status
|
genkernsyms.sh: genkernsyms.sh.in config.status
|
||||||
$(SHELL) ./config.status
|
$(SHELL) ./config.status
|
||||||
|
|
||||||
po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
|
$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
|
||||||
$(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_
|
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_
|
||||||
$(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
|
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
|
||||||
|
|
||||||
$(foreach lang, $(LINGUAS), po/$(lang).po): po/$(PACKAGE).pot
|
$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot
|
||||||
$(MSGMERGE) -U $@ po/$(PACKAGE).pot
|
$(MSGMERGE) -U $@ $^
|
||||||
|
|
||||||
po/%.mo: po/%.po
|
po/%.mo: po/%.po
|
||||||
$(MKDIR_P) $$(dirname $@)
|
$(MKDIR_P) $$(dirname $@)
|
||||||
|
|
|
@ -136,9 +136,9 @@ if test "x$YACC" = x; then
|
||||||
AC_MSG_ERROR([bison is not found])
|
AC_MSG_ERROR([bison is not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in /usr/src/unifont.bdf ; do
|
for file in /usr/src/unifont.bdf /usr/share/fonts/X11/misc/unifont.pcf.gz ; do
|
||||||
if test -e $file ; then
|
if test -e $file ; then
|
||||||
AC_SUBST([UNIFONT_BDF], [$file])
|
AC_SUBST([FONT_SOURCE], [$file])
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -216,21 +216,22 @@ static void
|
||||||
grub_gettext_init_ext (const char *lang)
|
grub_gettext_init_ext (const char *lang)
|
||||||
{
|
{
|
||||||
char *mo_file;
|
char *mo_file;
|
||||||
char *grub_prefix;
|
char *locale_dir;
|
||||||
|
|
||||||
grub_prefix = grub_env_get ("prefix");
|
locale_dir = grub_env_get ("locale_dir");
|
||||||
|
|
||||||
fd_mo = 0;
|
fd_mo = 0;
|
||||||
|
|
||||||
// mo_file e.g.: /boot/grub/locale/ca.mo
|
// mo_file e.g.: /boot/grub/locale/ca.mo
|
||||||
|
|
||||||
mo_file = grub_malloc (grub_strlen (grub_prefix) + sizeof ("/locale/") + grub_strlen (lang) + sizeof(".mo"));
|
mo_file = grub_malloc (grub_strlen (locale_dir) + sizeof ("/") + grub_strlen (lang) + sizeof(".mo"));
|
||||||
|
|
||||||
// Warning: if changing some paths in the below line, change the grub_malloc
|
// Warning: if changing some paths in the below line, change the grub_malloc
|
||||||
// contents below
|
// contents below
|
||||||
|
|
||||||
grub_sprintf (mo_file, "%s/locale/%s.mo", grub_prefix, lang);
|
grub_sprintf (mo_file, "%s/%s.mo", locale_dir, lang);
|
||||||
grub_dprintf(" -------------- %s ",mo_file);
|
|
||||||
|
grub_dprintf("gettext", "Will try to open file: %s " ,mo_file);
|
||||||
|
|
||||||
fd_mo = grub_mofile_open(mo_file);
|
fd_mo = grub_mofile_open(mo_file);
|
||||||
grub_free (mo_file);
|
grub_free (mo_file);
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
# define DEV_CYGDRIVE_MAJOR 98
|
# define DEV_CYGDRIVE_MAJOR 98
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNU__
|
||||||
|
#include <hurd.h>
|
||||||
|
#include <hurd/lookup.h>
|
||||||
|
#include <hurd/fs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <grub/util/misc.h>
|
#include <grub/util/misc.h>
|
||||||
#include <grub/util/hostdisk.h>
|
#include <grub/util/hostdisk.h>
|
||||||
#include <grub/util/getroot.h>
|
#include <grub/util/getroot.h>
|
||||||
|
@ -378,8 +384,65 @@ find_cygwin_root_device (const char *path, dev_t dev)
|
||||||
char *
|
char *
|
||||||
grub_guess_root_device (const char *dir)
|
grub_guess_root_device (const char *dir)
|
||||||
{
|
{
|
||||||
struct stat st;
|
|
||||||
char *os_dev;
|
char *os_dev;
|
||||||
|
#ifdef __GNU__
|
||||||
|
file_t file;
|
||||||
|
mach_port_t *ports;
|
||||||
|
int *ints;
|
||||||
|
loff_t *offsets;
|
||||||
|
char *data;
|
||||||
|
error_t err;
|
||||||
|
mach_msg_type_number_t num_ports = 0, num_ints = 0, num_offsets = 0, data_len = 0;
|
||||||
|
size_t name_len;
|
||||||
|
|
||||||
|
file = file_name_lookup (dir, 0, 0);
|
||||||
|
if (file == MACH_PORT_NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err = file_get_storage_info (file,
|
||||||
|
&ports, &num_ports,
|
||||||
|
&ints, &num_ints,
|
||||||
|
&offsets, &num_offsets,
|
||||||
|
&data, &data_len);
|
||||||
|
|
||||||
|
if (num_ints < 1)
|
||||||
|
grub_util_error ("Storage info for `%s' does not include type", dir);
|
||||||
|
if (ints[0] != STORAGE_DEVICE)
|
||||||
|
grub_util_error ("Filesystem of `%s' is not stored on local disk", dir);
|
||||||
|
|
||||||
|
if (num_ints < 5)
|
||||||
|
grub_util_error ("Storage info for `%s' does not include name", dir);
|
||||||
|
name_len = ints[4];
|
||||||
|
if (name_len < data_len)
|
||||||
|
grub_util_error ("Bogus name length for storage info for `%s'", dir);
|
||||||
|
if (data[name_len - 1] != '\0')
|
||||||
|
grub_util_error ("Storage name for `%s' not NUL-terminated", dir);
|
||||||
|
|
||||||
|
os_dev = xmalloc (strlen ("/dev/") + data_len);
|
||||||
|
memcpy (os_dev, "/dev/", strlen ("/dev/"));
|
||||||
|
memcpy (os_dev + strlen ("/dev/"), data, data_len);
|
||||||
|
|
||||||
|
if (ports && num_ports > 0)
|
||||||
|
{
|
||||||
|
mach_msg_type_number_t i;
|
||||||
|
for (i = 0; i < num_ports; i++)
|
||||||
|
{
|
||||||
|
mach_port_t port = ports[i];
|
||||||
|
if (port != MACH_PORT_NULL)
|
||||||
|
mach_port_deallocate (mach_task_self(), port);
|
||||||
|
}
|
||||||
|
munmap ((caddr_t) ports, num_ports * sizeof (*ports));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ints && num_ints > 0)
|
||||||
|
munmap ((caddr_t) ints, num_ints * sizeof (*ints));
|
||||||
|
if (offsets && num_offsets > 0)
|
||||||
|
munmap ((caddr_t) offsets, num_offsets * sizeof (*offsets));
|
||||||
|
if (data && data_len > 0)
|
||||||
|
munmap (data, data_len);
|
||||||
|
mach_port_deallocate (mach_task_self (), file);
|
||||||
|
#else /* !__GNU__ */
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
if (stat (dir, &st) < 0)
|
if (stat (dir, &st) < 0)
|
||||||
grub_util_error ("Cannot stat `%s'", dir);
|
grub_util_error ("Cannot stat `%s'", dir);
|
||||||
|
@ -393,6 +456,7 @@ grub_guess_root_device (const char *dir)
|
||||||
/* This might be truly slow, but is there any better way? */
|
/* This might be truly slow, but is there any better way? */
|
||||||
os_dev = find_root_device ("/dev", st.st_dev);
|
os_dev = find_root_device ("/dev", st.st_dev);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* !__GNU__ */
|
||||||
|
|
||||||
return os_dev;
|
return os_dev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
target_cpu=@target_cpu@
|
target_cpu=@target_cpu@
|
||||||
|
native_platform=@platform@
|
||||||
|
|
||||||
coreboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-coreboot
|
coreboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-coreboot
|
||||||
pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc
|
pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc
|
||||||
grub_mkisofs="grub-mkisofs"
|
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
|
@ -42,7 +42,7 @@ Make GRUB rescue image.
|
||||||
-h, --help print this message and exit
|
-h, --help print this message and exit
|
||||||
-v, --version print the version information and exit
|
-v, --version print the version information and exit
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
--modules=MODULES pre-load specified modules MODULES
|
||||||
--output=FILE save output in FILE
|
--output=FILE save output in FILE [required]
|
||||||
|
|
||||||
$0 generates a bootable rescue image with specified source files or directories.
|
$0 generates a bootable rescue image with specified source files or directories.
|
||||||
|
|
||||||
|
@ -63,6 +63,12 @@ for option in "$@"; do
|
||||||
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
||||||
--output=*)
|
--output=*)
|
||||||
output_image=`echo "$option" | sed 's/--output=//'` ;;
|
output_image=`echo "$option" | sed 's/--output=//'` ;;
|
||||||
|
# Intentionally undocumented
|
||||||
|
--override-directory=*)
|
||||||
|
override_dir=`echo "${option}/" | sed 's/--override-directory=//'`
|
||||||
|
PATH=${override_dir}:$PATH
|
||||||
|
export PATH
|
||||||
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
echo "Unrecognized option \`$option'" 1>&2
|
||||||
usage
|
usage
|
||||||
|
@ -73,12 +79,19 @@ for option in "$@"; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "x${output_image}" = x ] ; then
|
||||||
|
echo "output file must be given" >&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
iso9660_dir=`mktemp -d`
|
iso9660_dir=`mktemp -d`
|
||||||
mkdir -p ${iso9660_dir}/boot/grub
|
mkdir -p ${iso9660_dir}/boot/grub
|
||||||
|
|
||||||
for platform in pc coreboot ; do
|
process_input_dir ()
|
||||||
input_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-${platform}
|
{
|
||||||
if test -e ${input_dir} ; then
|
input_dir="$1"
|
||||||
|
platform="$2"
|
||||||
mkdir -p ${iso9660_dir}/boot/grub/${target_cpu}-${platform}
|
mkdir -p ${iso9660_dir}/boot/grub/${target_cpu}-${platform}
|
||||||
for file in ${input_dir}/*.mod ${input_dir}/efiemu??.o \
|
for file in ${input_dir}/*.mod ${input_dir}/efiemu??.o \
|
||||||
${input_dir}/command.lst ${input_dir}/moddep.lst ${input_dir}/fs.lst \
|
${input_dir}/command.lst ${input_dir}/moddep.lst ${input_dir}/fs.lst \
|
||||||
|
@ -87,11 +100,28 @@ for platform in pc coreboot ; do
|
||||||
cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
|
cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "${override_dir}" = "" ] ; then
|
||||||
|
if test -e "${coreboot_dir}" ; then
|
||||||
|
process_input_dir ${coreboot_dir} coreboot
|
||||||
|
fi
|
||||||
|
if test -e "${pc_dir}" ; then
|
||||||
|
process_input_dir ${pc_dir} pc
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
process_input_dir ${override_dir} ${native_platform}
|
||||||
|
coreboot_dir=
|
||||||
|
pc_dir=
|
||||||
|
case "${native_platform}" in
|
||||||
|
coreboot) coreboot_dir=${override_dir} ;;
|
||||||
|
pc) pc_dir=${override_dir} ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
# build coreboot core.img
|
# build coreboot core.img
|
||||||
if test -e ${coreboot_dir} ; then
|
if test -e "${coreboot_dir}" ; then
|
||||||
|
echo "Generates coreboot"
|
||||||
memdisk_img=`mktemp`
|
memdisk_img=`mktemp`
|
||||||
memdisk_dir=`mktemp -d`
|
memdisk_dir=`mktemp -d`
|
||||||
mkdir -p ${memdisk_dir}/boot/grub
|
mkdir -p ${memdisk_dir}/boot/grub
|
||||||
|
@ -115,18 +145,12 @@ EOF
|
||||||
memdisk tar search iso9660 configfile sh \
|
memdisk tar search iso9660 configfile sh \
|
||||||
ata at_keyboard
|
ata at_keyboard
|
||||||
rm -f ${memdisk_img}
|
rm -f ${memdisk_img}
|
||||||
grub_mkisofs="${grub_mkisofs} --modification-date=$(echo ${iso_uuid} | sed -e s/-//g)"
|
grub_mkisofs_arguments="${grub_mkisofs_arguments} --modification-date=$(echo ${iso_uuid} | sed -e s/-//g)"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${source}" != "" ] ; then
|
|
||||||
for d in ${source}; do
|
|
||||||
echo "Processing $d"
|
|
||||||
cp -dpRl "${d}" ${iso9660_dir}/
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build eltorito core.img
|
# build eltorito core.img
|
||||||
if test -e ${pc_dir} ; then
|
if test -e "${pc_dir}" ; then
|
||||||
|
echo "Generates eltorito"
|
||||||
core_img=`mktemp`
|
core_img=`mktemp`
|
||||||
grub-mkimage -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
|
grub-mkimage -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
|
||||||
memdisk tar search iso9660 configfile sh \
|
memdisk tar search iso9660 configfile sh \
|
||||||
|
@ -141,11 +165,11 @@ if test -e ${pc_dir} ; then
|
||||||
echo "source /boot/grub/grub.cfg") \
|
echo "source /boot/grub/grub.cfg") \
|
||||||
> ${iso9660_dir}/boot/grub/i386-pc/grub.cfg
|
> ${iso9660_dir}/boot/grub/i386-pc/grub.cfg
|
||||||
|
|
||||||
grub_mkisofs="${grub_mkisofs} -b boot/grub/i386-pc/eltorito.img -boot-info-table"
|
grub_mkisofs_arguments="${grub_mkisofs_arguments} -b boot/grub/i386-pc/eltorito.img -boot-info-table"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build iso image
|
# build iso image
|
||||||
${grub_mkisofs} -o ${output_image} -r -J ${iso9660_dir}
|
grub-mkisofs ${grub_mkisofs_arguments} -o ${output_image} -r ${iso9660_dir} ${source}
|
||||||
rm -rf ${iso9660_dir}
|
rm -rf ${iso9660_dir}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -22,7 +22,8 @@ prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
grub_prefix=`echo /boot/grub | sed ${transform}`
|
grub_prefix=`echo /boot/grub | sed ${transform}`
|
||||||
locale_prefix="/usr/share/locale" # TODO: dynamic with exec_prefix ?
|
locale_dir=`echo /boot/grub/locale | sed ${transform}`
|
||||||
|
grub_lang=`echo $LANG | cut -d _ -f 1`
|
||||||
|
|
||||||
. ${libdir}/grub/grub-mkconfig_lib
|
. ${libdir}/grub/grub-mkconfig_lib
|
||||||
|
|
||||||
|
@ -101,20 +102,12 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test -e ${grub_prefix}/gettext.mod -a -d /usr/share/locale; then
|
|
||||||
# Make the locales accesible
|
|
||||||
prepare_grub_to_access_device `${grub_probe} --target=device ${locale_prefix}`
|
|
||||||
lang=`get_locale_lang`
|
|
||||||
grub_locale_prefix=`make_system_path_relative_to_its_root ${locale_prefix}`
|
|
||||||
cat << EOF
|
|
||||||
# Gettext variables and module
|
# Gettext variables and module
|
||||||
set locale_prefix=${grub_locale_prefix}
|
cat << EOF
|
||||||
set lang=${lang}
|
set locale_dir=${locale_dir}
|
||||||
|
set lang=${grub_lang}
|
||||||
insmod gettext
|
insmod gettext
|
||||||
EOF
|
EOF
|
||||||
else
|
|
||||||
echo "gettext module or /usr/share/locale is not available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
|
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
|
||||||
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
|
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
|
||||||
|
|
|
@ -88,11 +88,16 @@ EOF
|
||||||
LLABEL="${LONGNAME}"
|
LLABEL="${LONGNAME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${LROOT}" != "${LBOOT}" ]; then
|
||||||
|
LKERNEL="${LKERNEL#/boot}"
|
||||||
|
LINITRD="${LINITRD#/boot}"
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${LLABEL} (on ${DEVICE})" {
|
menuentry "${LLABEL} (on ${DEVICE})" {
|
||||||
EOF
|
EOF
|
||||||
if [ -z "${prepare_boot_cache}" ]; then
|
if [ -z "${prepare_boot_cache}" ]; then
|
||||||
prepare_boot_cache="$(prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/")"
|
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
Loading…
Reference in a new issue