From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VI1tN-0008Nm-FX for mharc-grub-devel@gnu.org; Fri, 06 Sep 2013 15:40:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VI1tF-0008NA-Fo for grub-devel@gnu.org; Fri, 06 Sep 2013 15:40:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VI1t8-0005IQ-GJ for grub-devel@gnu.org; Fri, 06 Sep 2013 15:40:21 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:42011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VI1t8-0005I9-8S for grub-devel@gnu.org; Fri, 06 Sep 2013 15:40:14 -0400 Received: by mail-la0-f47.google.com with SMTP id eo20so3176960lab.34 for ; Fri, 06 Sep 2013 12:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=tuNgxuP3Ve3XfPgpYWdN5AdLwekPBUAUeHS5XNgt4Bo=; b=njHbpu+VhVUd2vBX2/WaS/2jqcirg2kvSPuowqlDf1D4m/jkFa8TgNvPlbvMpNVhMQ REiItX9oiq2lp+Zev359Ypt552aPQSmnCHcdRIOtXYcMNn12l+D4Bt1LNU1A3AKOUap4 Sh510IVFNkrcK9l0DUN5OG45B1GpLf9K3p2GfPzWGUGi/s2uDXulzkNpaltoX6ONyuuX 6A2YnJyMybsiRTM9uUApFRQEYMmV9ZYyoMJv2U6frZo1si40q2KIvNSq2OqyH2AXxAma 15HiGjFDsoduzo/V7I6ZsvgSgM5cjHYxbnrWuseqjZDB/ZUaD12rCUEIztbllcc7T1V2 Hk8w== X-Received: by 10.112.143.3 with SMTP id sa3mr4124480lbb.12.1378496412268; Fri, 06 Sep 2013 12:40:12 -0700 (PDT) Received: from opensuse.site (ppp79-139-160-84.pppoe.spdop.ru. [79.139.160.84]) by mx.google.com with ESMTPSA id vs11sm2088060lac.3.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 06 Sep 2013 12:40:11 -0700 (PDT) Date: Fri, 6 Sep 2013 23:40:10 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: [PATCH v2 4/5] Add -k, --pubkey=FILE support to grub-install command Message-ID: <20130906234010.72e07031@opensuse.site> In-Reply-To: <1378484333-13577-5-git-send-email-jonmccune@google.com> References: <1378484333-13577-1-git-send-email-jonmccune@google.com> <1378484333-13577-5-git-send-email-jonmccune@google.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22f X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 19:40:28 -0000 В Fri, 6 Sep 2013 09:18:52 -0700 Jon McCune пишет: > This simply passes along the public key to the grub-mkimage invocation > > Signed-off-by: Jon McCune > --- > util/grub-install.in | 13 +++++++++---- > util/grub-install_header | 6 ++++++ > 2 files changed, 15 insertions(+), 4 deletions(-) > > diff --git a/util/grub-install.in b/util/grub-install.in > index 1816bb1..3df0087 100644 > --- a/util/grub-install.in > +++ b/util/grub-install.in > @@ -650,10 +650,15 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in > *) imgext=img ;; > esac > > +pubkey_file_arg="" > +if [ -e "$pubkey_file" ]; then > + pubkey_file_arg="--pubkey=$pubkey_file" > +fi > + You should return an error if file does not exist, not silently ignore it. > + --pubkey | -k) > + pubkey_file=`argument $option "$@"`; grub_process_install_options_consumed=2 ;; > + --pubkey=*) > + pubkey_file=`echo "$option" | sed 's/--pubkey=//'` grub_process_install_options_consumed=1;; grub-mkimage supports multiple keys. This will work only for exactly one. > --modules) > modules=`argument $option "$@"`; grub_process_install_options_consumed=2;; > --modules=*)