[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v7 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT |
Date: |
Tue, 12 Mar 2019 16:13:53 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 3/12/19 2:51 PM, Unai Martinez-Corral wrote:
> Allow to set options '--persistent' and/or '--credential' through
> environment variables. If not defined, defaults are used ('no').
> Anyway, command-line arguments have priority over environment variables.
>
> Signed-off-by: Unai Martinez-Corral <address@hidden>
> Reviewed-by: Laurent Vivier <address@hidden>
> ---
> scripts/qemu-binfmt-conf.sh | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
> index ca15ff8092..ad9ae731a0 100755
> --- a/scripts/qemu-binfmt-conf.sh
> +++ b/scripts/qemu-binfmt-conf.sh
> @@ -186,9 +186,11 @@ Usage: qemu-binfmt-conf.sh [--qemu-path
> PATH][--debian][--systemd CPU]
> (default: $SYSTEMDDIR or $DEBIANDIR)
Remember, this is in an unquoted heredoc, so it looks something like:
(default: /etc/systemd or /usr/share/binfmts)
when actually printed.
> --credential: if present, credential and security tokens are
> calculated according to the binary to interpret
> + ($QEMU_CREDENTIAL=yes)
> --persistent: if present, the interpreter is loaded when binfmt is
> configured and remains in memory. All future uses
> are cloned from the open file.
> + ($QEMU_PERSISTENT=yes)
>
And with your change, when the environment starts empty (and thus the
script's default initialization of QEMU_PERSISTENT kicks in), this will
look like:
(no=yes)
You probably meant to write:
(default: \$QEMU_PERSISTENT=no)
to produce output of:
(default: $QEMU_PERSISTENT=no)
or:
(default: \${QEMU_PERSISTENT:-no})
to produce output of:
(default: ${QEMU_PERSISTENT:-no})
both to clarify that it defaults from the environment, and that its
default is no rather than yes.
> +
> +QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
> +QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
> +
> QEMU_SUFFIX=""
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v7 8/9] qemu-binfmt-conf.sh: add option --clear, (continued)
[Qemu-devel] [PATCH v7 7/9] qemu-binfmt-conf.sh: generalize <CPU> to positional TARGETS, Unai Martinez-Corral, 2019/03/12
[Qemu-devel] [PATCH v7 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX, Unai Martinez-Corral, 2019/03/12
[Qemu-devel] [PATCH v7 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*, Unai Martinez-Corral, 2019/03/12
[Qemu-devel] [PATCH v7 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT, Unai Martinez-Corral, 2019/03/12
- Re: [Qemu-devel] [PATCH v7 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT,
Eric Blake <=
[Qemu-devel] [PATCH v7 1/9] qemu-binfmt-conf.sh: enforce safe style consistency, Unai Martinez-Corral, 2019/03/12
[Qemu-devel] [PATCH v7 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options, Unai Martinez-Corral, 2019/03/12
[Qemu-devel] [PATCH v7 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean, Unai Martinez-Corral, 2019/03/12
Re: [Qemu-devel] [PATCH v7 0/9] qemu-binfmt-conf.sh, no-reply, 2019/03/12
Re: [Qemu-devel] [PATCH v7 0/9] qemu-binfmt-conf.sh, no-reply, 2019/03/12