merge with mainline
This commit is contained in:
commit
a6b1d2075e
20 changed files with 274 additions and 64 deletions
|
@ -50,7 +50,13 @@ EOF
|
|||
}
|
||||
|
||||
# Check the arguments.
|
||||
next_grub_cfg=false
|
||||
for option in "$@"; do
|
||||
if $next_grub_cfg; then
|
||||
grub_cfg=$option
|
||||
next_grub_cfg=false
|
||||
continue
|
||||
fi
|
||||
case "$option" in
|
||||
-h | --help)
|
||||
usage
|
||||
|
@ -59,8 +65,7 @@ for option in "$@"; do
|
|||
echo "$0 (GNU GRUB ${package_version})"
|
||||
exit 0 ;;
|
||||
-o)
|
||||
shift
|
||||
grub_cfg=$1
|
||||
next_grub_cfg=:
|
||||
;;
|
||||
--output=*)
|
||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||
|
@ -72,6 +77,11 @@ for option in "$@"; do
|
|||
;;
|
||||
esac
|
||||
done
|
||||
if $next_grub_cfg; then
|
||||
echo "Missing argument to \`-o'" 1>&2
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. ${libdir}/grub/grub-mkconfig_lib
|
||||
|
||||
|
@ -236,6 +246,10 @@ export GRUB_DEFAULT \
|
|||
GRUB_HIDDEN_TIMEOUT \
|
||||
GRUB_HIDDEN_TIMEOUT_QUIET \
|
||||
GRUB_TIMEOUT \
|
||||
GRUB_DEFAULT_BUTTON \
|
||||
GRUB_HIDDEN_TIMEOUT_BUTTON \
|
||||
GRUB_TIMEOUT_BUTTON \
|
||||
GRUB_BUTTON_CMOS_ADDRESS \
|
||||
GRUB_DISTRIBUTOR \
|
||||
GRUB_CMDLINE_LINUX \
|
||||
GRUB_CMDLINE_LINUX_DEFAULT \
|
||||
|
|
|
@ -41,7 +41,7 @@ usage (int status)
|
|||
printf ("\
|
||||
Usage: %s [OPTIONS] PATH\n\
|
||||
\n\
|
||||
Make a system path relative to it's root.\n\
|
||||
Make a system path relative to its root.\n\
|
||||
\n\
|
||||
Options:\n\
|
||||
-h, --help display this message and exit\n\
|
||||
|
|
|
@ -38,11 +38,29 @@ if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
|
|||
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
|
||||
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
|
||||
|
||||
if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
|
||||
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
|
||||
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi
|
||||
|
||||
cat << EOF
|
||||
if [ -s \$prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
EOF
|
||||
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
|
||||
cat <<EOF
|
||||
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
|
||||
set default="${GRUB_DEFAULT_BUTTON}"
|
||||
else
|
||||
set default="${GRUB_DEFAULT}"
|
||||
fi
|
||||
EOF
|
||||
else
|
||||
cat <<EOF
|
||||
set default="${GRUB_DEFAULT}"
|
||||
EOF
|
||||
fi
|
||||
cat <<EOF
|
||||
if [ \${prev_saved_entry} ]; then
|
||||
set saved_entry=\${prev_saved_entry}
|
||||
save_env saved_entry
|
||||
|
@ -186,21 +204,36 @@ insmod gettext
|
|||
EOF
|
||||
fi
|
||||
|
||||
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
|
||||
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
|
||||
verbose=
|
||||
else
|
||||
verbose=" --verbose"
|
||||
fi
|
||||
cat << EOF
|
||||
if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
|
||||
set timeout=${GRUB_TIMEOUT}
|
||||
make_timeout ()
|
||||
{
|
||||
if [ "x${1}" != "x" ] ; then
|
||||
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
|
||||
verbose=
|
||||
else
|
||||
verbose=" --verbose"
|
||||
fi
|
||||
cat << EOF
|
||||
if sleep$verbose --interruptible ${1} ; then
|
||||
set timeout=${2}
|
||||
fi
|
||||
EOF
|
||||
else
|
||||
cat << EOF
|
||||
set timeout=${GRUB_TIMEOUT}
|
||||
else
|
||||
cat << EOF
|
||||
set timeout=${2}
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
|
||||
cat <<EOF
|
||||
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
|
||||
EOF
|
||||
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}"
|
||||
echo else
|
||||
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
|
||||
echo fi
|
||||
else
|
||||
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
|
||||
fi
|
||||
|
||||
# Play an initial tune
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <grub/kernel.h>
|
||||
#include <grub/dl.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue