From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MGtEt-0006xr-F4 for mharc-grub-devel@gnu.org; Wed, 17 Jun 2009 07:23:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGtEo-0006wV-Gx for grub-devel@gnu.org; Wed, 17 Jun 2009 07:23:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGtEj-0006vt-Eb for grub-devel@gnu.org; Wed, 17 Jun 2009 07:23:29 -0400 Received: from [199.232.76.173] (port=51733 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGtEj-0006vq-8i for grub-devel@gnu.org; Wed, 17 Jun 2009 07:23:25 -0400 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:46590) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGtEi-000832-Ru for grub-devel@gnu.org; Wed, 17 Jun 2009 07:23:25 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1MGtEh-0005cv-W8 for grub-devel@gnu.org; Wed, 17 Jun 2009 11:23:24 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1MGtEh-00026f-00; Wed, 17 Jun 2009 12:23:23 +0100 Date: Wed, 17 Jun 2009 12:23:23 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20090617112323.GZ7367@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH] Support GRUB_DISABLE_LINUX_RECOVERY 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: Wed, 17 Jun 2009 11:23:30 -0000 This patch fixes https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/190207. Index: ChangeLog =================================================================== --- ChangeLog (revision 2335) +++ ChangeLog (working copy) @@ -1,5 +1,10 @@ +2009-06-17 Colin Watson + + * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export + variable. + * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true, + don't write a menu entry for recovery mode. + 2009-06-17 Colin Watson * util/elf/grub-mkimage.c (usage): Prefix each option line with two Index: util/grub-mkconfig.in =================================================================== --- util/grub-mkconfig.in (revision 2335) +++ util/grub-mkconfig.in (working copy) @@ -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_GFXMODE +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 if test "x${grub_cfg}" != "x"; then rm -f ${grub_cfg}.new Index: util/grub.d/10_linux.in =================================================================== --- util/grub.d/10_linux.in (revision 2335) +++ util/grub.d/10_linux.in (working copy) @@ -143,8 +143,10 @@ linux_entry "${OS}, Linux ${version}" \ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" - linux_entry "${OS}, Linux ${version} (recovery mode)" \ - "single ${GRUB_CMDLINE_LINUX}" + if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}, Linux ${version} (recovery mode)" \ + "single ${GRUB_CMDLINE_LINUX}" + fi list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` done Thanks, -- Colin Watson [cjwatson@ubuntu.com]