* util/grub-mkstandalone.in: Fix help messages. Gettextize.
* util/grub-install.in: Gettextize. * util/grub-mkconfig.in: Likewise. * util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo if not available. (grub_warn): Gettextize. * util/grub-mknetdir.in: Gettextize. * util/grub-mkrescue.in: Likewise. * util/grub-mkstandalone.in: Likewise. * util/grub-reboot.in: Likewise. * util/grub-set-default.in: Likewise. * util/grub.d/00_header.in: Likewise. * util/grub.d/10_hurd.in: Likewise. * util/grub.d/10_kfreebsd.in: Likewise. * util/grub.d/10_linux.in: Likewise. * util/grub.d/10_netbsd.in: Likewise. * util/grub.d/10_windows.in: Likewise. * util/grub.d/20_linux_xen.in: Likewise. * util/grub.d/30_os-prober.in: Likewise. * po/POTFILES-shell.in: Regenerate.
This commit is contained in:
parent
69edd81ab7
commit
a32d5c712d
18 changed files with 265 additions and 204 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
||||||
|
2012-02-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkstandalone.in: Fix help messages. Gettextize.
|
||||||
|
* util/grub-install.in: Gettextize.
|
||||||
|
* util/grub-mkconfig.in: Likewise.
|
||||||
|
* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
|
||||||
|
if not available.
|
||||||
|
(grub_warn): Gettextize.
|
||||||
|
* util/grub-mknetdir.in: Gettextize.
|
||||||
|
* util/grub-mkrescue.in: Likewise.
|
||||||
|
* util/grub-mkstandalone.in: Likewise.
|
||||||
|
* util/grub-reboot.in: Likewise.
|
||||||
|
* util/grub-set-default.in: Likewise.
|
||||||
|
* util/grub.d/00_header.in: Likewise.
|
||||||
|
* util/grub.d/10_hurd.in: Likewise.
|
||||||
|
* util/grub.d/10_kfreebsd.in: Likewise.
|
||||||
|
* util/grub.d/10_linux.in: Likewise.
|
||||||
|
* util/grub.d/10_netbsd.in: Likewise.
|
||||||
|
* util/grub.d/10_windows.in: Likewise.
|
||||||
|
* util/grub.d/20_linux_xen.in: Likewise.
|
||||||
|
* util/grub.d/30_os-prober.in: Likewise.
|
||||||
|
* po/POTFILES-shell.in: Regenerate.
|
||||||
|
|
||||||
2012-02-03 Richard Laager <rlaager@wiktel.com>
|
2012-02-03 Richard Laager <rlaager@wiktel.com>
|
||||||
|
|
||||||
* util/grub-mkimage.c (main): Fix format-security warning.
|
* util/grub-mkimage.c (main): Fix format-security warning.
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
# List of files which contain translatable strings. Only files written in
|
util/grub.d/00_header.in
|
||||||
# Shell language are included here.
|
|
||||||
util/grub.d/10_hurd.in
|
util/grub.d/10_hurd.in
|
||||||
|
util/grub.d/10_illumos.in
|
||||||
util/grub.d/10_kfreebsd.in
|
util/grub.d/10_kfreebsd.in
|
||||||
util/grub.d/10_linux.in
|
util/grub.d/10_linux.in
|
||||||
util/grub.d/10_netbsd.in
|
util/grub.d/10_netbsd.in
|
||||||
|
util/grub.d/10_windows.in
|
||||||
util/grub.d/20_linux_xen.in
|
util/grub.d/20_linux_xen.in
|
||||||
|
util/grub.d/30_os-prober.in
|
||||||
|
util/grub.d/40_custom.in
|
||||||
|
util/grub.d/41_custom.in
|
||||||
|
util/grub-install.in
|
||||||
|
util/grub-kbdcomp.in
|
||||||
|
util/grub-mkconfig.in
|
||||||
|
util/grub-mkconfig_lib.in
|
||||||
|
util/grub-mknetdir.in
|
||||||
|
util/grub-mkrescue.in
|
||||||
|
util/grub-mkstandalone.in
|
||||||
|
util/grub-reboot.in
|
||||||
|
util/grub-set-default.in
|
||||||
|
util/powerpc/ieee1275/grub-mkrescue.in
|
||||||
|
|
|
@ -79,63 +79,53 @@ else
|
||||||
disk_module=native
|
disk_module=native
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
if [ "${target_cpu}-${platform}" = "i386-pc" ] \
|
if [ "${target_cpu}-${platform}" = "i386-pc" ] \
|
||||||
|| [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]; then
|
|| [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]; then
|
||||||
cat <<EOF
|
gettext_printf "Usage: %s [OPTION] install_device" "$self"
|
||||||
Usage: $self [OPTION] install_device
|
else
|
||||||
EOF
|
gettext_printf "Usage: %s [OPTION] [install_device]" "$self"
|
||||||
else
|
fi
|
||||||
cat <<EOF
|
echo
|
||||||
Usage: $self [OPTION] [install_device]
|
gettext "Install GRUB on your drive." ; echo
|
||||||
EOF
|
echo
|
||||||
fi
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
cat <<EOF
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
Install GRUB on your drive.
|
printf " --modules=%-14s%s\n" "$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
|
||||||
|
dirmsg="$(printf "install GRUB images under the directory DIR/%s instead of the %s directory" "@grubdirname@" "$grubdir")"
|
||||||
-h, --help print this message and exit
|
printf " --boot-directory=%-7s%s\n" "$(gettext "DIR")" "$dirmsg"
|
||||||
-v, --version print the version information and exit
|
printf " --grub-setup=%-11s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-setup")"
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
printf " --grub-mkimage=%-9s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
|
||||||
--boot-directory=DIR install GRUB images under the directory DIR/@grubdirname@
|
printf " --grub-mkrelpath=%-7s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkrelpath")"
|
||||||
instead of the $grubdir directory
|
printf " --grub-mkdevicemap=%-5s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkdevicemap")"
|
||||||
--grub-setup=FILE use FILE as grub-setup
|
printf " --grub-probe=%-11s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-probe")"
|
||||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
printf " --no-floppy %s\n" "$(gettext "do not probe any floppy drive")"
|
||||||
--grub-mkrelpath=FILE use FILE as grub-mkrelpath
|
printf " --allow-floppy %s\n" "$(gettext "Make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes.")"
|
||||||
--grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
|
printf " --recheck %s\n" "$(gettext "delete device map if it already exists")"
|
||||||
--grub-probe=FILE use FILE as grub-probe
|
printf " --force %s\n" "$(gettext "install even if problems are detected")"
|
||||||
--no-floppy do not probe any floppy drive
|
|
||||||
--allow-floppy Make the drive also bootable as floppy
|
|
||||||
(default for fdX devices). May break on some BIOSes.
|
|
||||||
--recheck delete device map if it already exists
|
|
||||||
--force install even if problems are detected
|
|
||||||
EOF
|
|
||||||
if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
|
if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
|
||||||
cat <<EOF
|
printf " --disk-module=%-10s%s\n" "$(gettext "MODULE")" "$(gettext "disk module to use (biosdisk or native)")"
|
||||||
--disk-module=MODULE disk module to use (biosdisk or native)
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
if [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ] ; then
|
if [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ] ; then
|
||||||
cat <<EOF
|
printf " --no-nvram %s\n" "$(gettext "don't update the boot-device NVRAM variable")"
|
||||||
--no-nvram don't update the boot-device NVRAM variable
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
if [ "${platform}" = "efi" ]; then
|
if [ "${platform}" = "efi" ]; then
|
||||||
cat <<EOF
|
|
||||||
--removable the installation device is removable
|
printf " --removable %s\n" "$(gettext "the installation device is removable")"
|
||||||
--bootloader-id=ID the ID of bootloader.
|
printf " --bootloader-id=%-8s%s\n" "$(gettext "ID")" "$(gettext "the ID of bootloader.")"
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
echo
|
||||||
|
gettext "INSTALL_DEVICE must be system device filename.";echo
|
||||||
|
echo
|
||||||
|
|
||||||
INSTALL_DEVICE can be a GRUB device name or a system device filename.
|
gettext_printf "%s copies GRUB images into %s, and uses grub-setup
|
||||||
|
to install grub into the boot sector.\n" "$self" "$grubdir";echo
|
||||||
$self copies GRUB images into $grubdir, and uses grub-setup
|
echo
|
||||||
to install grub into the boot sector.
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
|
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -265,8 +255,6 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
|
||||||
|
|
||||||
if test "x$install_device" = x && ([ "${target_cpu}-${platform}" = "i386-pc" ] \
|
if test "x$install_device" = x && ([ "${target_cpu}-${platform}" = "i386-pc" ] \
|
||||||
|| [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]); then
|
|| [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]); then
|
||||||
echo "install_device not specified." 1>&2
|
echo "install_device not specified." 1>&2
|
||||||
|
|
|
@ -42,19 +42,19 @@ grub_script_check="${bindir}/`echo grub-script-check | sed "${transform}"`"
|
||||||
|
|
||||||
GRUB_PREFIX=`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`
|
GRUB_PREFIX=`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
gettext_printf "Usage: %s [OPTION]\n" "$self"
|
||||||
Usage: $self [OPTION]
|
gettext "Generate a grub config file"; echo
|
||||||
Generate a grub config file
|
echo
|
||||||
|
printf " -o, --output=%-11s%s\n" "$(gettext FILE)" "$(gettext "output generated config to FILE [default=stdout]")"
|
||||||
-o, --output=FILE output generated config to FILE [default=stdout]
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
-h, --help print this message and exit
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
-v, --version print the version information and exit
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -62,7 +62,7 @@ argument () {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo "$0: option requires an argument -- '$opt'" 1>&2
|
gettext_printf "%s: option requires an argument -- '%s'" "$0" "$opt" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $1
|
echo $1
|
||||||
|
@ -87,7 +87,7 @@ do
|
||||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -113,7 +113,7 @@ if [ "$EUID" != 0 ] ; then
|
||||||
done ;;
|
done ;;
|
||||||
esac
|
esac
|
||||||
if [ $root != t ] ; then
|
if [ $root != t ] ; then
|
||||||
echo "$self: You must run this as root" >&2
|
gettext_printf "%s: You must run this as root\n" "$self" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -122,7 +122,7 @@ set $grub_probe dummy
|
||||||
if test -f "$1"; then
|
if test -f "$1"; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo "$1: Not found." 1>&2
|
gettext_print "%s: Not found.\n" "$1" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ for x in ${GRUB_TERMINAL_OUTPUT}; do
|
||||||
fi
|
fi
|
||||||
if [ -z "${GRUB_FONT_PATH}" ] ; then
|
if [ -z "${GRUB_FONT_PATH}" ] ; then
|
||||||
if [ "x$termoutdefault" != "x1" ]; then
|
if [ "x$termoutdefault" != "x1" ]; then
|
||||||
echo "No font for gfxterm found." >&2 ; exit 1
|
gettext "No font for gfxterm found." >&2; echo >&2 ; exit 1
|
||||||
fi
|
fi
|
||||||
GRUB_TERMINAL_OUTPUT=
|
GRUB_TERMINAL_OUTPUT=
|
||||||
fi
|
fi
|
||||||
|
@ -253,10 +253,11 @@ if test "x${grub_cfg}" != "x"; then
|
||||||
|
|
||||||
# Allow this to fail, since /boot/grub/ might need to be fatfs to support some
|
# Allow this to fail, since /boot/grub/ might need to be fatfs to support some
|
||||||
# firmware implementations (e.g. OFW or EFI).
|
# firmware implementations (e.g. OFW or EFI).
|
||||||
chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
|
chmod 400 ${grub_cfg}.new || grub_warn "$(gettext_printf "Could not make %s \
|
||||||
This means that if the generated config contains a password it is readable by everyone"
|
readable by only root. This means that if the generated config contains a password it is readable by everyone" "${grub_cfg}.new")"
|
||||||
fi
|
fi
|
||||||
echo "Generating grub.cfg ..." >&2
|
gettext "Generating grub.cfg ..." >&2
|
||||||
|
echo >&2
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
#
|
#
|
||||||
|
@ -286,14 +287,15 @@ done
|
||||||
|
|
||||||
if test "x${grub_cfg}" != "x" ; then
|
if test "x${grub_cfg}" != "x" ; then
|
||||||
if ! ${grub_script_check} ${grub_cfg}.new; then
|
if ! ${grub_script_check} ${grub_cfg}.new; then
|
||||||
echo "Syntax errors are detected in generated GRUB config file." >&2
|
gettext_printf "Syntax errors are detected in generated GRUB config file.
|
||||||
echo "Ensure that there are no errors in /etc/default/grub" >&2
|
Ensure that there are no errors in /etc/default/grub
|
||||||
echo "and /etc/grub.d/* files or please file a bug report with" >&2
|
and /etc/grub.d/* files or please file a bug report with
|
||||||
echo "${grub_cfg}.new file attached." >&2
|
%s file attached." "${grub_cfg}.new" >&2
|
||||||
else
|
else
|
||||||
# none of the children aborted with error, install the new grub.cfg
|
# none of the children aborted with error, install the new grub.cfg
|
||||||
mv -f ${grub_cfg}.new ${grub_cfg}
|
mv -f ${grub_cfg}.new ${grub_cfg}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "done" >&2
|
gettext "done" >&2
|
||||||
|
echo >&2
|
||||||
|
|
|
@ -32,14 +32,16 @@ if test "x$grub_mkrelpath" = x; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $(which gettext >/dev/null 2>/dev/null) ; then
|
if $(which gettext >/dev/null 2>/dev/null) ; then
|
||||||
gettext="gettext"
|
:
|
||||||
else
|
else
|
||||||
gettext="echo"
|
gettext () {
|
||||||
|
echo -n "$@"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grub_warn ()
|
grub_warn ()
|
||||||
{
|
{
|
||||||
echo "Warning: $@" >&2
|
echo "$(gettext "Warning:")" "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
make_system_path_relative_to_its_root ()
|
make_system_path_relative_to_its_root ()
|
||||||
|
@ -228,7 +230,7 @@ version_find_latest ()
|
||||||
# printf; so this turns ' into \'. Note that you must use the output of
|
# printf; so this turns ' into \'. Note that you must use the output of
|
||||||
# this function in a printf format string.
|
# this function in a printf format string.
|
||||||
gettext_quoted () {
|
gettext_quoted () {
|
||||||
"$gettext" "$@" | sed "s/'/'\\\\\\\\''/g"
|
gettext "$@" | sed "s/'/'\\\\\\\\''/g"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run the first argument through gettext_quoted, and then pass that and all
|
# Run the first argument through gettext_quoted, and then pass that and all
|
||||||
|
|
|
@ -29,6 +29,7 @@ PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
host_os=@host_os@
|
host_os=@host_os@
|
||||||
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
|
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
|
||||||
|
datadir="@datadir@"
|
||||||
|
|
||||||
self=`basename $0`
|
self=`basename $0`
|
||||||
|
|
||||||
|
@ -51,24 +52,24 @@ efi32_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/i386-efi"
|
||||||
efi64_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi"
|
efi64_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi"
|
||||||
itanium_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/ia64-efi"
|
itanium_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/ia64-efi"
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
gettext_printf "Usage: %s [OPTION] install_device\n" "$self"
|
||||||
Usage: $self [OPTION] install_device
|
gettext; echo "Install GRUB on your drive."; echo
|
||||||
Install GRUB on your drive.
|
echo
|
||||||
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
-h, --help print this message and exit
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
-v, --version print the version information and exit
|
printf " --modules=%-14s%s\n" "$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
printf " --net-directory=%-8s%s\n" "$(gettext "DIR")" "$(gettext "root directory of TFTP server")"
|
||||||
--net-directory=DIR root directory of TFTP server
|
printf " --subdir=%-15s%s\n" "$(gettext "DIR")" "$(gettext "relative subdirectory on network server")"
|
||||||
--subdir=DIR relative subdirectory on network server
|
printf " --grub-mkimage=%-9s%s" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
|
||||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
echo
|
||||||
|
gettext_printf "%s copies GRUB images into net_directory/subdir/target_cpu-platform\n" "$self"
|
||||||
$self copies GRUB images into net_directory/subdir/target_cpu-platform
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -76,7 +77,7 @@ argument () {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo "$0: option requires an argument -- '$opt'" 1>&2
|
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $1
|
echo $1
|
||||||
|
@ -138,7 +139,7 @@ do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -156,7 +157,7 @@ set $grub_mkimage dummy
|
||||||
if test -f "$1"; then
|
if test -f "$1"; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo "$1: Not found." 1>&2
|
gettext_printf "%s: Not found.\n" "$1" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -215,7 +216,7 @@ process_input_dir ()
|
||||||
*-efi) mkimage_target="${platform}";
|
*-efi) mkimage_target="${platform}";
|
||||||
netmodules="efinet";
|
netmodules="efinet";
|
||||||
ext=efi ;;
|
ext=efi ;;
|
||||||
*) echo Unsupported platform ${platform};
|
*) gettext_printf "Unsupported platform %s\n" ${platform};
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -224,7 +225,7 @@ source ${subdir}/grub.cfg
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
"$grub_mkimage" ${config_opt} -d "${input_dir}" -O ${mkimage_target} "--output=${grubdir}/core.$ext" "--prefix=$prefix" $modules $netmodules tftp || exit 1
|
"$grub_mkimage" ${config_opt} -d "${input_dir}" -O ${mkimage_target} "--output=${grubdir}/core.$ext" "--prefix=$prefix" $modules $netmodules tftp || exit 1
|
||||||
echo "Netboot directory for ${platform} created. Configure your DHCP server to point to ${subdir}/${platform}/core.$ext"
|
gettext_printf "Netboot directory for %s created. Configure your DHCP server to point to %s\n" "${platform}" "${subdir}/${platform}/core.$ext"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${override_dir}" = "" ] ; then
|
if [ "${override_dir}" = "" ] ; then
|
||||||
|
|
|
@ -29,6 +29,7 @@ libdir="@libdir@"
|
||||||
PACKAGE_NAME=@PACKAGE_NAME@
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
|
datadir="@datadir@"
|
||||||
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
|
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
|
||||||
|
|
||||||
self=`basename $0`
|
self=`basename $0`
|
||||||
|
@ -45,29 +46,29 @@ grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
|
||||||
|
|
||||||
xorriso=xorriso
|
xorriso=xorriso
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self"
|
||||||
Usage: $self [OPTION] SOURCE...
|
gettext "Make GRUB rescue image."; echo
|
||||||
Make GRUB rescue image.
|
echo
|
||||||
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
-h, --help print this message and exit
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
-v, --version print the version information and exit
|
printf " -o, --output=%-11s%s\n" "$(gettext FILE)" "$(gettext "save output in FILE [required]")"
|
||||||
-o, --output=FILE save output in FILE [required]
|
printf " --modules=%-14s%s\n" "$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
printf " --rom-directory=%-8s%s\n" "$(gettext "DIR")" "$(gettext "save rom images in DIR [optional]")"
|
||||||
--rom-directory=DIR save rom images in DIR [optional]
|
printf " --xorriso=%-14s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as xorriso [optional]")"
|
||||||
--xorriso=FILE use FILE as xorriso [optional]
|
printf " --grub-mkimage=%-9s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
|
||||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
echo
|
||||||
|
gettext_printf "%s generates a bootable rescue image with specified source files, source
|
||||||
$self generates a bootable rescue image with specified source files, source
|
directories, or mkisofs options listed by: xorriso -as mkisofs -help" "$self"
|
||||||
directories, or mkisofs options listed by: xorriso -as mkisofs -help
|
echo
|
||||||
|
gettext "Option -- switches to native xorriso command mode."; echo
|
||||||
Option -- switches to native xorriso command mode.
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
gettext "Mail xorriso support requests to <bug-xorriso@gnu.org>."; echo
|
||||||
Mail xorriso support requests to <bug-xorriso@gnu.org>.
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -75,7 +76,7 @@ argument () {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo "$0: option requires an argument -- '$opt'" 1>&2
|
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $1
|
echo $1
|
||||||
|
@ -139,7 +140,8 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "x${output_image}" = x ] ; then
|
if [ "x${output_image}" = x ] ; then
|
||||||
echo "output file must be given" >&2
|
gettext "output file must be given" >&2
|
||||||
|
echo >&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -148,7 +150,7 @@ set $grub_mkimage dummy
|
||||||
if test -f "$1"; then
|
if test -f "$1"; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo "$1: Not found." 1>&2
|
gettext_printf "%s: Not found.\n" "$1" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -187,7 +189,7 @@ make_image ()
|
||||||
return;
|
return;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Enabling $2 support ..."
|
gettext_printf "Enabling %s support ...\n" "$2"
|
||||||
|
|
||||||
memdisk_img=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
memdisk_img=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
||||||
memdisk_dir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
memdisk_dir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
||||||
|
@ -255,7 +257,7 @@ grub_mkisofs_arguments="${grub_mkisofs_arguments} --modification-date=$(echo ${i
|
||||||
|
|
||||||
# build BIOS core.img
|
# build BIOS core.img
|
||||||
if test -e "${pc_dir}" ; then
|
if test -e "${pc_dir}" ; then
|
||||||
echo "Enabling BIOS support ..."
|
gettext_printf "Enabling %s support ...\n" "BIOS"
|
||||||
core_img=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
core_img=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
||||||
$grub_mkimage -O i386-pc -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
|
$grub_mkimage -O i386-pc -d ${pc_dir}/ -o ${core_img} --prefix=/boot/grub/i386-pc \
|
||||||
iso9660 biosdisk
|
iso9660 biosdisk
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Make GRUB rescue image
|
# Make GRUB rescue image
|
||||||
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# GRUB is free software: you can redistribute it and/or modify
|
# GRUB is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,6 +30,7 @@ PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
|
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
|
||||||
|
datadir="@datadir@"
|
||||||
|
|
||||||
self=`basename $0`
|
self=`basename $0`
|
||||||
|
|
||||||
|
@ -39,27 +40,31 @@ format=
|
||||||
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
|
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
|
||||||
source=
|
source=
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
formats="i386-coreboot i386-multiboot i386-pc i386-pc-pxe i386-efi i386-ieee1275 i386-qemu x86_64-efi mipsel-yeeloong-flash mipsel-fuloong2f-flash mipsel-loongson-elf powerpc-ieee1275 sparc64-ieee1275-raw sparc64-ieee1275-aout ia64-efi mips-arc mipsel-qemu_mips-elf mips-qemu_mips-flash mipsel-qemu_mips-flash mips-qemu_mips-elf"
|
||||||
Usage: $self [OPTION] SOURCE...
|
gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self"
|
||||||
Make GRUB rescue image.
|
gettext "Make GRUB rescue image."; echo
|
||||||
|
echo
|
||||||
-h, --help print this message and exit
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
-v, --version print the version information and exit
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
-o, --output=FILE save output in FILE [required]
|
printf " -o, --output=%-11s%s\n" "$(gettext FILE)" "$(gettext "save output in FILE [required]")"
|
||||||
-d, --directory=DIR use images and modules under DIR [default=%s/@platform@]
|
dir_msg="$(gettext_printf "use images and modules under DIR [default=%s/<platform>]" "${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})")"
|
||||||
-O, --format=FORMAT generate an image in format
|
printf " -d, --directory=%-8s%s\n" \
|
||||||
available formats: %s
|
"DIR" "$dir_msg"
|
||||||
-C, --compression=(xz|none|auto) choose the compression to use
|
printf " -O, --format=%-11s%s" "$(gettext "FORMAT")" "$(gettext "generate an image in format")"; echo
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
printf " %s %s\n" "$(gettext "available formats:")" "$formats"
|
||||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
echo
|
||||||
|
printf " -C, --compression=(xz|none|auto) %s\n" "$(gettext "choose the compression to use")"
|
||||||
$self generates a standalone image (containing all modules) in the selected format
|
printf " --modules=%-14s%s\n" "$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
|
||||||
|
printf " --grub-mkimage=%-9s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
echo
|
||||||
EOF
|
gettext_printf "%s generates a standalone image (containing all modules) in the selected format" "$self"
|
||||||
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -67,7 +72,7 @@ argument () {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo "$0: option requires an argument -- '$opt'" 1>&2
|
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $1
|
echo $1
|
||||||
|
@ -123,14 +128,15 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "x${output_image}" = x ] ; then
|
if [ "x${output_image}" = x ] ; then
|
||||||
echo "output file must be given" >&2
|
gettext "output file must be specified" >&2
|
||||||
|
echo >&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x${format}" = x ] ; then
|
if [ "x${format}" = x ] ; then
|
||||||
echo "format must be given" >&2
|
gettext "format must be specified" >&2
|
||||||
usage
|
echo >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ exec_prefix=@exec_prefix@
|
||||||
bindir=@bindir@
|
bindir=@bindir@
|
||||||
PACKAGE_NAME=@PACKAGE_NAME@
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
|
datadir="@datadir@"
|
||||||
|
|
||||||
self=`basename $0`
|
self=`basename $0`
|
||||||
|
|
||||||
|
@ -32,22 +33,22 @@ rootdir=
|
||||||
bootdir=
|
bootdir=
|
||||||
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
gettext_printf "Usage: %s [OPTION] entry" "$self"
|
||||||
Usage: $self [OPTION] entry
|
gettext "Set the default boot entry for GRUB, for the next boot only."; echo
|
||||||
Set the default boot entry for GRUB, for the next boot only.
|
echo
|
||||||
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
-h, --help print this message and exit
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
-v, --version print the version information and exit
|
dirmsg="$(gettext_printf "expect GRUB images under the directory DIR/%s instead of the %s directory" "@grubdirname@" "$grubdir")"
|
||||||
--boot-directory=DIR expect GRUB images under the directory DIR/@grubdirname@
|
printf " --boot-directory=%-7s%s\n" "$(gettext "DIR")" "$dirmsg"
|
||||||
instead of the $grubdir directory
|
echo
|
||||||
|
gettext "ENTRY is a number or a menu item title."; echo
|
||||||
ENTRY is a number or a menu item title.
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -55,7 +56,7 @@ argument () {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo "$0: option requires an argument -- '$opt'" 1>&2
|
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $1
|
echo $1
|
||||||
|
@ -87,13 +88,14 @@ do
|
||||||
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
|
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
|
||||||
|
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
gettext_printf "Unrecognized option \`%s'" "$option" 1>&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test "x$entry" != x; then
|
if test "x$entry" != x; then
|
||||||
echo "More than one entry?" 1>&2
|
gettext "More than one entry?" 1>&2
|
||||||
|
echo >&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -102,7 +104,8 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "x$entry" = x; then
|
if test "x$entry" = x; then
|
||||||
echo "entry not specified." 1>&2
|
gettext "entry not specified." 1>&2
|
||||||
|
echo >&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -24,6 +24,7 @@ exec_prefix=@exec_prefix@
|
||||||
bindir=@bindir@
|
bindir=@bindir@
|
||||||
PACKAGE_NAME=@PACKAGE_NAME@
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||||
|
datadir="@datadir@"
|
||||||
|
|
||||||
self=`basename $0`
|
self=`basename $0`
|
||||||
|
|
||||||
|
@ -32,22 +33,22 @@ rootdir=
|
||||||
bootdir=
|
bootdir=
|
||||||
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
||||||
|
|
||||||
|
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
gettext_printf "Usage: %s [OPTION] entry\n" "$self"
|
||||||
Usage: $self [OPTION] entry
|
gettext "Set the default boot entry for GRUB."; echo
|
||||||
Set the default boot entry for GRUB.
|
echo
|
||||||
|
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
|
||||||
-h, --help print this message and exit
|
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
|
||||||
-v, --version print the version information and exit
|
dirmsg="$(printf "expect GRUB images under the directory DIR/%s instead of the %s directory" "@grubdirname@" "$grubdir")"
|
||||||
--boot-directory=DIR expect GRUB images under the directory DIR/@grubdirname@
|
printf " --boot-directory=%-7s%s\n" "$(gettext "DIR")" "$dirmsg"
|
||||||
instead of the $grubdir directory
|
echo
|
||||||
|
gettext "ENTRY is a number or a menu item title."; echo
|
||||||
ENTRY is a number or a menu item title.
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
Report bugs to <bug-grub@gnu.org>.
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argument () {
|
argument () {
|
||||||
|
@ -55,7 +56,7 @@ argument () {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo "$0: option requires an argument -- '$opt'" 1>&2
|
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $1
|
echo $1
|
||||||
|
@ -87,13 +88,14 @@ do
|
||||||
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
|
bootdir=`echo "$option" | sed 's/--boot-directory=//'` ;;
|
||||||
|
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
gettext_printf "Unrecognized option \`%s'" "$option" 1>&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test "x$entry" != x; then
|
if test "x$entry" != x; then
|
||||||
echo "More than one entry?" 1>&2
|
gettext "More than one entry?" 1>&2
|
||||||
|
echo >&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -102,7 +104,8 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "x$entry" = x; then
|
if test "x$entry" = x; then
|
||||||
echo "entry not specified." 1>&2
|
gettext "entry not specified." 1>&2
|
||||||
|
echo >&2
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -113,11 +113,11 @@ done
|
||||||
|
|
||||||
if [ "x$serial" = x1 ]; then
|
if [ "x$serial" = x1 ]; then
|
||||||
if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
|
if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
|
||||||
echo "Serial terminal not available on this platform." >&2 ; exit 1
|
gettext "Serial terminal not available on this platform." >&2 ; echo >&2; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
|
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
|
||||||
grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
|
grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
|
||||||
GRUB_SERIAL_COMMAND=serial
|
GRUB_SERIAL_COMMAND=serial
|
||||||
fi
|
fi
|
||||||
echo "${GRUB_SERIAL_COMMAND}"
|
echo "${GRUB_SERIAL_COMMAND}"
|
||||||
|
@ -174,7 +174,8 @@ esac
|
||||||
if [ "x$gfxterm" = x1 ]; then
|
if [ "x$gfxterm" = x1 ]; then
|
||||||
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
|
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
|
||||||
&& is_path_readable_by_grub "$GRUB_THEME"; then
|
&& is_path_readable_by_grub "$GRUB_THEME"; then
|
||||||
echo "Found theme: $GRUB_THEME" >&2
|
gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2
|
||||||
|
|
||||||
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
|
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
|
||||||
cat << EOF
|
cat << EOF
|
||||||
insmod gfxmenu
|
insmod gfxmenu
|
||||||
|
@ -208,12 +209,12 @@ set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
|
||||||
EOF
|
EOF
|
||||||
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
|
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
|
||||||
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then
|
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then
|
||||||
echo "Found background: $GRUB_BACKGROUND" >&2
|
gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
|
||||||
case "$GRUB_BACKGROUND" in
|
case "$GRUB_BACKGROUND" in
|
||||||
*.png) reader=png ;;
|
*.png) reader=png ;;
|
||||||
*.tga) reader=tga ;;
|
*.tga) reader=tga ;;
|
||||||
*.jpg|*.jpeg) reader=jpeg ;;
|
*.jpg|*.jpeg) reader=jpeg ;;
|
||||||
*) echo "Unsupported image format" >&2; exit 1 ;;
|
*) gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
|
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
|
@ -41,7 +41,8 @@ for i in /boot/gnumach* ; do
|
||||||
basename=`basename $i`
|
basename=`basename $i`
|
||||||
dirname=`dirname $i`
|
dirname=`dirname $i`
|
||||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||||
echo "Found GNU Mach: $i" >&2
|
gettext_printf "Found GNU Mach: %s" "$i" >&2
|
||||||
|
echo >&2
|
||||||
kernels="${kernels} ${rel_dirname}/${basename}"
|
kernels="${kernels} ${rel_dirname}/${basename}"
|
||||||
at_least_one=true
|
at_least_one=true
|
||||||
fi
|
fi
|
||||||
|
@ -55,7 +56,8 @@ esac
|
||||||
|
|
||||||
for i in /hurd/${hurd_fs}.static /hurd/exec ; do
|
for i in /hurd/${hurd_fs}.static /hurd/exec ; do
|
||||||
if test -e "$i" ; then
|
if test -e "$i" ; then
|
||||||
echo "Found Hurd module: $i" >&2
|
gettext_printf "Found Hurd module: %s" "$i" >&2
|
||||||
|
echo >&2
|
||||||
at_least_one=true
|
at_least_one=true
|
||||||
else
|
else
|
||||||
all_of_them=false
|
all_of_them=false
|
||||||
|
@ -68,7 +70,8 @@ if ${at_least_one} ; then : ; else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
|
if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
|
||||||
echo "Some Hurd stuff found, but not enough to boot." >&2
|
gettext "Some Hurd stuff found, but not enough to boot." >&2
|
||||||
|
echo >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ prepare_boot_cache=
|
||||||
|
|
||||||
while [ "x$list" != "x" ] ; do
|
while [ "x$list" != "x" ] ; do
|
||||||
kfreebsd=`version_find_latest $list`
|
kfreebsd=`version_find_latest $list`
|
||||||
echo "Found kernel of FreeBSD: $kfreebsd" >&2
|
gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2
|
||||||
basename=`basename $kfreebsd`
|
basename=`basename $kfreebsd`
|
||||||
dirname=`dirname $kfreebsd`
|
dirname=`dirname $kfreebsd`
|
||||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||||
|
@ -184,7 +184,7 @@ while [ "x$list" != "x" ] ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if test -n "${module_dir}" ; then
|
if test -n "${module_dir}" ; then
|
||||||
echo "Found kernel module directory: ${module_dir}" >&2
|
gettext_printf "Found kernel module directory: %s\n" "${module_dir}" >&2
|
||||||
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
|
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ prepare_root_cache=
|
||||||
|
|
||||||
while [ "x$list" != "x" ] ; do
|
while [ "x$list" != "x" ] ; do
|
||||||
linux=`version_find_latest $list`
|
linux=`version_find_latest $list`
|
||||||
echo "Found linux image: $linux" >&2
|
gettext_printf "Found linux image: %s\n" "$linux" >&2
|
||||||
basename=`basename $linux`
|
basename=`basename $linux`
|
||||||
dirname=`dirname $linux`
|
dirname=`dirname $linux`
|
||||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||||
|
@ -181,7 +181,7 @@ while [ "x$list" != "x" ] ; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
|
||||||
elif test -z "${initramfs}" ; then
|
elif test -z "${initramfs}" ; then
|
||||||
# "UUID=" magic is parsed by initrd or initramfs. Since there's
|
# "UUID=" magic is parsed by initrd or initramfs. Since there's
|
||||||
# no initrd or builtin initramfs, it can't work here.
|
# no initrd or builtin initramfs, it can't work here.
|
||||||
|
|
|
@ -132,7 +132,7 @@ for k in $(ls -t /netbsd*) ; do
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Found NetBSD kernel: $k" >&2
|
gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2
|
||||||
netbsd_entry "knetbsd" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
netbsd_entry "knetbsd" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
||||||
netbsd_entry "multiboot" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
netbsd_entry "multiboot" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
||||||
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||||
|
|
|
@ -63,11 +63,11 @@ for drv in $drives ; do
|
||||||
|
|
||||||
# Check for Vista bootmgr.
|
# Check for Vista bootmgr.
|
||||||
if [ -f "$dir"/bootmgr -a -f "$dir"/boot/bcd ] ; then
|
if [ -f "$dir"/bootmgr -a -f "$dir"/boot/bcd ] ; then
|
||||||
OS="Windows Vista bootmgr"
|
OS="$(gettext_quoted "Windows Vista bootmgr")"
|
||||||
|
|
||||||
# Check for NTLDR.
|
# Check for NTLDR.
|
||||||
elif [ -f "$dir"/ntldr -a -f "$dir"/ntdetect.com -a -f "$dir"/boot.ini ] ; then
|
elif [ -f "$dir"/ntldr -a -f "$dir"/ntdetect.com -a -f "$dir"/boot.ini ] ; then
|
||||||
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="Windows NT/2000/XP loader"
|
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="$(gettext_quoted "Windows NT/2000/XP loader")"
|
||||||
needmap=t
|
needmap=t
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -77,7 +77,7 @@ for drv in $drives ; do
|
||||||
# Get boot /dev/ice.
|
# Get boot /dev/ice.
|
||||||
dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
|
dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
|
||||||
|
|
||||||
echo "Found $OS on $drv ($dev)" >&2
|
gettext_printf "Found %s on %s (%s)\n" "$OS" "$drv" "$dev" >&2
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "$OS" {
|
menuentry "$OS" {
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -142,7 +142,7 @@ while [ "x${xen_list}" != "x" ] ; do
|
||||||
echo "submenu \"Xen ${xen_version}\" {"
|
echo "submenu \"Xen ${xen_version}\" {"
|
||||||
while [ "x$list" != "x" ] ; do
|
while [ "x$list" != "x" ] ; do
|
||||||
linux=`version_find_latest $list`
|
linux=`version_find_latest $list`
|
||||||
echo "Found linux image: $linux" >&2
|
gettext_printf "Found linux image: %s\n" "$linux" >&2
|
||||||
basename=`basename $linux`
|
basename=`basename $linux`
|
||||||
dirname=`dirname $linux`
|
dirname=`dirname $linux`
|
||||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||||
|
@ -162,7 +162,7 @@ while [ "x${xen_list}" != "x" ] ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
|
||||||
else
|
else
|
||||||
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
||||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||||
|
|
|
@ -39,8 +39,17 @@ if [ -z "${OSPROBED}" ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
osx_entry() {
|
osx_entry() {
|
||||||
|
if [ x$2 = x32 ]; then
|
||||||
|
# TRANSLATORS: it refers to kernel architecture (32-bit)
|
||||||
|
bitstr="$(gettext "(32-bit)")"
|
||||||
|
else
|
||||||
|
# TRANSLATORS: it refers to kernel architecture (32-bit)
|
||||||
|
bitstr="$(gettext "(64-bit)")"
|
||||||
|
fi
|
||||||
|
# TRANSLATORS: it refers on the OS residing on device %s
|
||||||
|
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${LONGNAME} (${2}-bit) (on ${DEVICE})" --class osx --class darwin --class os {
|
menuentry "${LONGNAME} $bitstr $onstr" --class osx --class darwin --class os {
|
||||||
EOF
|
EOF
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||||
|
@ -99,13 +108,14 @@ for OS in ${OSPROBED} ; do
|
||||||
LONGNAME="${LABEL}"
|
LONGNAME="${LABEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Found ${LONGNAME} on ${DEVICE}" >&2
|
gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
|
||||||
|
|
||||||
case ${BOOT} in
|
case ${BOOT} in
|
||||||
chain)
|
chain)
|
||||||
|
|
||||||
|
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${LONGNAME} (on ${DEVICE})" --class windows --class os {
|
menuentry "${LONGNAME} $onstr" --class windows --class os {
|
||||||
EOF
|
EOF
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||||
|
@ -146,8 +156,9 @@ EOF
|
||||||
LINITRD="${LINITRD#/boot}"
|
LINITRD="${LINITRD#/boot}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${LLABEL} (on ${DEVICE})" --class gnu-linux --class gnu --class os {
|
menuentry "${LLABEL} $onstr" --class gnu-linux --class gnu --class os {
|
||||||
EOF
|
EOF
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
if [ -z "${prepare_boot_cache}" ]; then
|
if [ -z "${prepare_boot_cache}" ]; then
|
||||||
|
@ -173,8 +184,9 @@ EOF
|
||||||
osx_entry xnu_kernel64 64
|
osx_entry xnu_kernel64 64
|
||||||
;;
|
;;
|
||||||
hurd)
|
hurd)
|
||||||
|
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${LONGNAME} (on ${DEVICE})" --class hurd --class gnu --class os {
|
menuentry "${LONGNAME} $onstr" --class hurd --class gnu --class os {
|
||||||
EOF
|
EOF
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||||
|
@ -198,7 +210,8 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo " ${LONGNAME} is not yet supported by grub-mkconfig." >&2
|
echo -n " "
|
||||||
|
gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue