Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HoCvl-0008Qk-VC for mharc-grub-devel@gnu.org; Wed, 16 May 2007 02:24:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoCvk-0008Pf-Ea for grub-devel@gnu.org; Wed, 16 May 2007 02:24:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoCvi-0008N8-KS for grub-devel@gnu.org; Wed, 16 May 2007 02:24:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoCvi-0008N5-C7 for grub-devel@gnu.org; Wed, 16 May 2007 02:24:10 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HoCnj-0006v4-AF for grub-devel@gnu.org; Wed, 16 May 2007 02:15:55 -0400 Received: from [192.168.10.6] (helo=aragorn) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HoCnd-0005ZB-Dw for grub-devel@gnu.org; Wed, 16 May 2007 08:15:49 +0200 Received: from rmh by aragorn with local (Exim 4.63) (envelope-from ) id 1HoCpP-0005ue-HV for grub-devel@gnu.org; Wed, 16 May 2007 08:17:39 +0200 Date: Wed, 16 May 2007 08:17:39 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20070516061739.GA22567@aragorn> References: <20070511160314.GA30111@aragorn> <20070511161134.GA30158@aragorn> <20070511162143.GA30863@aragorn> <200705152222.06588.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705152222.06588.okuji@enbug.org> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: Genre and OS details not recognized. Subject: Re: [PATCH] grub-install for EFI 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, 16 May 2007 06:24:12 -0000 On Tue, May 15, 2007 at 10:22:06PM +0200, Yoshinori K. Okuji wrote: > > Or perhaps it should do like powerpc and check that /boot/grub is a mount > > point? > > > > # Find the partition at the right mount point. > > install_device=`awk '$2 == '"\"$grubdir\""' { print $1 }' < /proc/mounts` > > if test "x$install_device" = x; then > > echo "$grubdir must be a mount point." > > exit 1 > > fi > > It is a bad idea to use /proc, at least without checking the operating system. > This makes the script unportable among host operating systems. Note that this code is in powerpc/../grub-install.in already, and in my version of i386/efi/grub-install.in it didn't made in. Instead, sanity check there is: fs_module=`$grub_probe --target=fs --device-map=${device_map} ${grubdir}` if test "x$fs_module" = xfat; then :; else echo "${grubdir} doesn't look like an EFI partition." 1>&2 exit 1 fi -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.