@item GRUB_DEFAULT_BUTTON
@itemx GRUB_TIMEOUT_BUTTON
+@itemx GRUB_TIMEOUT_STYLE_BUTTON
@itemx GRUB_BUTTON_CMOS_ADDRESS
Variants of the corresponding variables without the @samp{_BUTTON} suffix,
used to support vendor-specific power buttons. @xref{Vendor power-on keys}.
@node Vendor power-on keys
@chapter Using GRUB with vendor power-on keys
-Some laptop vendors provide an additional power-on button which boots another
-OS. GRUB supports such buttons with the @samp{GRUB_TIMEOUT_BUTTON},
-@samp{GRUB_DEFAULT_BUTTON}, @samp{GRUB_HIDDEN_TIMEOUT_BUTTON} and
-@samp{GRUB_BUTTON_CMOS_ADDRESS} variables in default/grub (@pxref{Simple
-configuration}). @samp{GRUB_TIMEOUT_BUTTON}, @samp{GRUB_DEFAULT_BUTTON} and
-@samp{GRUB_HIDDEN_TIMEOUT_BUTTON} are used instead of the corresponding
-variables without the @samp{_BUTTON} suffix when powered on using the special
-button. @samp{GRUB_BUTTON_CMOS_ADDRESS} is vendor-specific and partially
-model-specific. Values known to the GRUB team are:
+Some laptop vendors provide an additional power-on button which boots
+another OS. GRUB supports such buttons with the @samp{GRUB_TIMEOUT_BUTTON},
+@samp{GRUB_TIMEOUT_STYLE_BUTTON}, @samp{GRUB_DEFAULT_BUTTON},
+@samp{GRUB_HIDDEN_TIMEOUT_BUTTON} and @samp{GRUB_BUTTON_CMOS_ADDRESS}
+variables in default/grub (@pxref{Simple configuration}).
+@samp{GRUB_TIMEOUT_BUTTON}, @samp{GRUB_TIMEOUT_STYLE_BUTTON},
+@samp{GRUB_DEFAULT_BUTTON}, and @samp{GRUB_HIDDEN_TIMEOUT_BUTTON} are used
+instead of the corresponding variables without the @samp{_BUTTON} suffix
+when powered on using the special button. @samp{GRUB_BUTTON_CMOS_ADDRESS}
+is vendor-specific and partially model-specific. Values known to the GRUB
+team are:
@table @key
@item Dell XPS M1330M
make_timeout ()
{
- if [ "x${GRUB_TIMEOUT_STYLE}" != "x" ] ; then
+ if [ "x${3}" != "x" ] ; then
cat << EOF
if [ x\$feature_timeout_style = xy ] ; then
- set timeout_style=${GRUB_TIMEOUT_STYLE}
+ set timeout_style=${3}
set timeout=${2}
EOF
- if [ "x${GRUB_TIMEOUT_STYLE}" != "xmenu" ] ; then
+ if [ "x${3}" != "xmenu" ] ; then
# Fallback hidden-timeout code in case the timeout_style feature
# is unavailable. Note that we now ignore GRUB_HIDDEN_TIMEOUT
# and take the hidden-timeout from GRUB_TIMEOUT instead.
- if [ "x${GRUB_TIMEOUT_STYLE}" = "xhidden" ] ; then
+ if [ "x${3}" = "xhidden" ] ; then
verbose=
else
verbose=" --verbose"
cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
EOF
-make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}"
+make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
echo else
-make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
+make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
echo fi
else
-make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
+make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
fi
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then