* util/grub.d/00_header.in: Improve compatibility with old config.

This commit is contained in:
Andrey Borzenkov 2013-12-24 17:26:05 +01:00 committed by Vladimir Serbinenko
parent 4127206896
commit 569766e49b
2 changed files with 34 additions and 28 deletions

View file

@ -1,3 +1,7 @@
2013-12-24 Andrey Borzenkov <arvidjaar@gmail.com>
* util/grub.d/00_header.in: Improve compatibility with old config.
2013-12-24 Vladimir Serbinenko <phcoder@gmail.com>
Make rijndael.c respect aliasing rules.

View file

@ -282,11 +282,10 @@ fi
make_timeout ()
{
if [ "x${1}${3}" != "x" ] ; then
if [ "x${3}" != "x" ] ; then
timeout="${2}"
style="${3}"
else
elif [ "x${1}" != "x" -a "x${1}" != "x0" ] ; then
# Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme.
timeout="${1}"
if [ "x${2}" != "x0" ] ; then
@ -294,21 +293,29 @@ make_timeout ()
fi
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
style="hidden"
verbose=
else
style="countdown"
fi
fi
if [ "x${style}" = "xcountdown" ] ; then
verbose=" --verbose"
fi
else
verbose=
# No hidden timeout, so treat as GRUB_TIMEOUT_STYLE=menu
timeout="${2}"
style="menu"
fi
cat << EOF
if [ x\$feature_timeout_style = xy ] ; then
set timeout_style=${style}
set timeout=${timeout}
EOF
if [ "x${style}" != "xmenu" ] ; then
if [ "x${style}" = "xmenu" ] ; then
cat << EOF
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=${timeout}
EOF
else
cat << EOF
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
@ -319,11 +326,6 @@ EOF
cat << EOF
fi
EOF
else
cat << EOF
set timeout=${2}
EOF
fi
}
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then