From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KSrOH-0008W4-6f for mharc-grub-devel@gnu.org; Tue, 12 Aug 2008 06:46:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSrOC-0008Uw-Ku for grub-devel@gnu.org; Tue, 12 Aug 2008 06:46:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSrO9-0008UG-KZ for grub-devel@gnu.org; Tue, 12 Aug 2008 06:46:06 -0400 Received: from [199.232.76.173] (port=55294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSrO8-0008U0-O8 for grub-devel@gnu.org; Tue, 12 Aug 2008 06:46:05 -0400 Received: from aybabtu.com ([69.60.117.155]:53740) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSrO8-0000k9-7J for grub-devel@gnu.org; Tue, 12 Aug 2008 06:46:04 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KSrG3-0001M3-1G for grub-devel@gnu.org; Tue, 12 Aug 2008 12:37:43 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KSrMr-00012e-KF for grub-devel@gnu.org; Tue, 12 Aug 2008 12:44:45 +0200 Date: Tue, 12 Aug 2008 12:44:45 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080812104445.GA3930@thorin> References: <20080811213240.GF6883@thorin> <20080812085213.GA381@thorin> <20080812101521.GA3022@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Idea: use menu hook to implement the savedefault command 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: Tue, 12 Aug 2008 10:46:09 -0000 On Tue, Aug 12, 2008 at 06:38:08PM +0800, Bean wrote: > > > > My idea was to implement unlock in scripting. So you could do something like: > > > > menuentry unlock { > > echo Password: > > read user_pass > > if [ $user_pass = foo ] ; then > > unset menu_lock > > fi > > } > > > > but Okuji had some objections to this (see the thread I pasted) > > Hi, > > I know that, but isn't "unlock" another menu item which would normally > be locked by menu_lock ? You can hard coded it to ignore the "unlock" > menu, but what if user want to use another name. My patch only implements "locking" in the sense that you can't get access to command-line, or edit menuentries, but you can run all existing entries. If you want to "lock" in the sense of locking a single entry, my intention was that this could be done with scripting as well: menuentry locked { if [ $menu_lock = 1 ] ; then echo fail else blah fi } Is that what you mean? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."