Bug#497085: allow making no timeout

jidanni at jidanni.org jidanni at jidanni.org
Fri Aug 29 19:20:19 UTC 2008


Package: grub-pc
Version: 1.96+20080724-8
Severity: wishlist
File: /etc/default/grub
Tags: patch

The following patches enable the user to avoid creating any timeout
line in grub.cfg, without her/him needing to edit more than
/etc/default/grub.

*** /etc/grub.d/00_header	2008-08-18 22:44:45.000000000 +0800
--- ./00_header	2008-08-30 03:06:09.012320005 +0800
***************
*** 31,39 ****

! if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
! if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
!
! cat << EOF
! set default=${GRUB_DEFAULT}
! set timeout=${GRUB_TIMEOUT}
! EOF

--- 31,37 ----

! echo set default=${GRUB_DEFAULT:-0}
! if [ "x${GRUB_TIMEOUT-UNSET}" != xUNSET ]
! then
!     echo set timeout=${GRUB_TIMEOUT:-5}
! fi

*** /etc/default/grub	2008-08-30 00:57:51.000000000 +0800
--- ./grub	2008-08-30 03:11:34.608326367 +0800
***************
*** 3,4 ****
--- 3,5 ----
  GRUB_DEFAULT=0
+ #Comment out if you want no timeout, so one must press RETURN
  GRUB_TIMEOUT=5

There is one problem, what happens when one has no timeout line is not
documented. Nor is what GRUB_TIMEOUT=0 will do.

Therefore my comment line above might not be correct.

Maybe the only way to have it wait for RETURN for a long time is
GRUB_TIMEOUT=99999.

P.S., trailing blanks generated:
$ grep -c ' $' /boot/grub/grub.cfg
4





More information about the Pkg-grub-devel mailing list