~cyphermox/ubuntu/wily/grub2/lp1097570

« back to all changes in this revision

Viewing changes to .pc/quick_boot.patch/util/grub.d/00_header.in

  • Committer: Package Import Robot
  • Author(s): Colin Watson, Robert Millan, Colin Watson
  • Date: 2013-12-03 16:53:32 UTC
  • Revision ID: package-import@ubuntu.com-20131203165332-6ao0wq900yihmmv9
Tags: 2.00-21
[ Robert Millan ]
* Backport from upstream:
  - Accept ZFS version 5000 (feature based).

[ Colin Watson ]
* Silence error message on initial installation when /etc/default/grub
  does not yet exist.
* Add GRUB_RECOVERY_TITLE option, to allow the controversial "recovery
  mode" text to be customised (LP: #1240360).
* Backport from upstream:
  - Revamp hidden timeout handling by adding a new timeout_style
    environment variable and a corresponding GRUB_TIMEOUT_STYLE
    configuration key for grub-mkconfig.  This controls hidden-timeout
    handling more simply than the previous arrangements, and pressing any
    hotkeys associated with menu entries during the hidden timeout will
    now boot the corresponding menu entry immediately (LP: #1178618).  As
    part of merging this, radically simplify the mess that
    quick_boot.patch had made of /etc/grub.d/30_os-prober; if it finds
    other OSes it can now just set timeout_style=menu and make sure the
    timeout is non-zero.
  - Fix build with FreeType 2.5.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
 
273
273
make_timeout ()
274
274
{
275
 
    if [ "x${1}" != "x" ] ; then
276
 
        if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
 
275
    if [ "x${1}${3}" != "x" ] ; then
 
276
        if [ "x${3}" != "x" ] ; then
 
277
            timeout="${2}"
 
278
            style="${3}"
 
279
        else
 
280
            # Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme.
 
281
            timeout="${1}"
 
282
            if [ "x${2}" != "x0" ] ; then
 
283
                grub_warn "$(gettext "Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.")"
 
284
            fi
 
285
            if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
 
286
                style="hidden"
 
287
            else
 
288
                style="countdown"
 
289
            fi
 
290
        fi
 
291
        if [ "x${style}" = "xcountdown" ] ; then
 
292
            verbose=" --verbose"
 
293
        else
277
294
            verbose=
278
 
        else
279
 
            verbose=" --verbose"
280
 
        fi
281
 
        cat << EOF
282
 
if sleep$verbose --interruptible ${1} ; then
283
 
  set timeout=${2}
 
295
        fi
 
296
        cat << EOF
 
297
if [ x\$feature_timeout_style = xy ] ; then
 
298
  set timeout_style=${style}
 
299
  set timeout=${timeout}
 
300
EOF
 
301
        if [ "x${style}" != "xmenu" ] ; then
 
302
            cat << EOF
 
303
# Fallback hidden-timeout code in case the timeout_style feature is
 
304
# unavailable.
 
305
elif sleep${verbose} --interruptible ${timeout} ; then
 
306
  set timeout=0
 
307
EOF
 
308
        fi
 
309
        cat << EOF
284
310
fi
285
311
EOF
286
312
    else
294
320
    cat <<EOF
295
321
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
296
322
EOF
297
 
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}"
 
323
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
298
324
echo else
299
 
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
 
325
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
300
326
echo fi
301
327
else
302
 
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
 
328
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
303
329
fi
304
330
 
305
331
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then