В Fri,  6 Sep 2013 09:18:52 -0700
Jon McCune <jonmcc...@google.com> пишет:

> This simply passes along the public key to the grub-mkimage invocation
> 
> Signed-off-by: Jon McCune <jonmcc...@google.com>
> ---
>  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=*)


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to