From 9a10df160ee55b6f664b3ef2d74c4bb1defe660d Mon Sep 17 00:00:00 2001 From: robertmh Date: Thu, 13 Aug 2009 20:08:23 +0000 Subject: [PATCH] 2009-08-13 Colin Watson * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT. * util/grub.d/00_header.in: Enter interruptible sleep if GRUB_HIDDEN_TIMEOUT is set. --- ChangeLog | 6 ++++++ util/grub-mkconfig.in | 22 ++++++++++++++++++++-- util/grub.d/00_header.in | 18 +++++++++++++++++- 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4aeacf68a..ab51146e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-13 Colin Watson + + * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT. + * util/grub.d/00_header.in: Enter interruptible sleep if + GRUB_HIDDEN_TIMEOUT is set. + 2009-08-13 Yves Blusseau * include/grub/symbol.h: Add the LOCAL macro. diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index f20c9de69..5865b89ce 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -190,10 +190,28 @@ esac # These are defined in this script, export them here so that user can # override them. -export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES +export GRUB_DEVICE \ + GRUB_DEVICE_UUID \ + GRUB_DEVICE_BOOT \ + GRUB_DEVICE_BOOT_UUID \ + GRUB_FS \ + GRUB_FONT_PATH \ + GRUB_PRELOAD_MODULES # These are optional, user-defined variables. -export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE +export GRUB_DEFAULT \ + GRUB_HIDDEN_TIMEOUT \ + GRUB_HIDDEN_TIMEOUT_QUIET \ + GRUB_TIMEOUT \ + GRUB_DISTRIBUTOR \ + GRUB_CMDLINE_LINUX \ + GRUB_CMDLINE_LINUX_DEFAULT \ + GRUB_TERMINAL_INPUT \ + GRUB_TERMINAL_OUTPUT \ + GRUB_SERIAL_COMMAND \ + GRUB_DISABLE_LINUX_UUID \ + GRUB_DISABLE_LINUX_RECOVERY \ + GRUB_GFXMODE if test "x${grub_cfg}" != "x"; then rm -f ${grub_cfg}.new diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in index a273213f3..98c7c004b 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in @@ -37,7 +37,6 @@ if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi cat << EOF set default=${GRUB_DEFAULT} -set timeout=${GRUB_TIMEOUT} EOF case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in @@ -112,3 +111,20 @@ fi EOF ;; esac + +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} +fi +EOF +else + cat << EOF +set timeout=${GRUB_TIMEOUT} +EOF +fi