From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MaSGo-0001Zj-JK for mharc-grub-devel@gnu.org; Mon, 10 Aug 2009 06:38:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaSGk-0001YL-TZ for grub-devel@gnu.org; Mon, 10 Aug 2009 06:38:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaSGf-0001Uq-Bd for grub-devel@gnu.org; Mon, 10 Aug 2009 06:38:21 -0400 Received: from [199.232.76.173] (port=40285 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaSGf-0001UR-2H for grub-devel@gnu.org; Mon, 10 Aug 2009 06:38:17 -0400 Received: from mx20.gnu.org ([199.232.41.8]:36263) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MaSGe-0003pQ-Fw for grub-devel@gnu.org; Mon, 10 Aug 2009 06:38:16 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MaSGc-00052G-HA for grub-devel@gnu.org; Mon, 10 Aug 2009 06:38:14 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1MaSGa-00027t-7g for grub-devel@gnu.org; Mon, 10 Aug 2009 10:38:12 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1MaSGZ-0001g1-00; Mon, 10 Aug 2009 11:38:11 +0100 Date: Mon, 10 Aug 2009 11:38:11 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20090810103811.GO11691@riva.ucam.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="SEFvVLxbW/dEDtN8" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: [PATCH] Integrate hiddenmenu X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2009 10:38:23 -0000 --SEFvVLxbW/dEDtN8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'd like to integrate http://grub.enbug.org/Hiddenmenu as a grub-mkconfig option so that we can use it by default in Ubuntu. How does the attached patch look? I dropped the --verbose from the wiki page since I personally prefer it to be silent, although obviously this could be patched in or out as desired. I also moved the timeout down to after the point when the graphical terminal is initialised, to decrease the period when GRUB isn't in the desired screen resolution. 2009-08-10 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. Thanks, -- Colin Watson [cjwatson@ubuntu.com] --SEFvVLxbW/dEDtN8 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="grub2-hidden-timeout.diff" diff -Nur -x '*.orig' -x '*~' grub2-1.96+20090725/util/grub-mkconfig.in grub2-1.96+20090725.new/util/grub-mkconfig.in --- grub2-1.96+20090725/util/grub-mkconfig.in 2009-08-08 19:31:00.000000000 +0100 +++ grub2-1.96+20090725.new/util/grub-mkconfig.in 2009-08-08 21:05:05.000000000 +0100 @@ -173,7 +173,7 @@ 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_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 -Nur -x '*.orig' -x '*~' grub2-1.96+20090725/util/grub.d/00_header.in grub2-1.96+20090725.new/util/grub.d/00_header.in --- grub2-1.96+20090725/util/grub.d/00_header.in 2009-08-08 21:05:02.000000000 +0100 +++ grub2-1.96+20090725.new/util/grub.d/00_header.in 2009-08-08 21:06:12.000000000 +0100 @@ -37,7 +37,6 @@ cat << EOF set default=${GRUB_DEFAULT} -set timeout=${GRUB_TIMEOUT} EOF case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in @@ -112,3 +111,15 @@ EOF ;; esac + +if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then + cat << EOF +if sleep --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then + set timeout=${GRUB_TIMEOUT} +fi +EOF +else + cat << EOF +set timeout=${GRUB_TIMEOUT} +EOF +fi --SEFvVLxbW/dEDtN8--