[Libguestfs] [PATCH] fish: Set program name correctly for virt-{copy, tar}-{in, out} programs.
Pino Toscano
ptoscano at redhat.com
Fri Feb 26 10:54:15 UTC 2016
On Thursday 25 February 2016 11:39:13 Richard W.M. Jones wrote:
> Set the (libguestfs handle) program name correctly when running
> programs like virt-copy-in, so the program name is not "guestfish" but
> "virt-copy-in".
>
> Note this feature cannot be tested using the ./run script, since
> libtool (buggily) resets the program name to "lt-guestfish". However
> I tested it on the installed copy and it worked there.
> ---
> fish/virt-copy-in | 2 +-
> fish/virt-copy-out | 2 +-
> fish/virt-tar-in | 2 +-
> fish/virt-tar-out | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fish/virt-copy-in b/fish/virt-copy-in
> index d1be1b2..4bdccfb 100755
> --- a/fish/virt-copy-in
> +++ b/fish/virt-copy-in
> @@ -24,4 +24,4 @@ for arg in $@; do
> esac
> done
>
> -exec guestfish --rw -i copy-in "$@"
> +exec -a "$0" guestfish --rw -i copy-in "$@"
> diff --git a/fish/virt-copy-out b/fish/virt-copy-out
> index 2648a4d..ff69388 100755
> --- a/fish/virt-copy-out
> +++ b/fish/virt-copy-out
> @@ -24,4 +24,4 @@ for arg in $@; do
> esac
> done
>
> -exec guestfish --ro -i copy-out "$@"
> +exec -a "$0" guestfish --ro -i copy-out "$@"
> diff --git a/fish/virt-tar-in b/fish/virt-tar-in
> index dca1bbe..066f27d 100755
> --- a/fish/virt-tar-in
> +++ b/fish/virt-tar-in
> @@ -24,4 +24,4 @@ for arg in $@; do
> esac
> done
>
> -exec guestfish --rw -i tar-in "$@"
> +exec -a "$0" guestfish --rw -i tar-in "$@"
> diff --git a/fish/virt-tar-out b/fish/virt-tar-out
> index 4a83e40..9cc6d7e 100755
> --- a/fish/virt-tar-out
> +++ b/fish/virt-tar-out
> @@ -24,4 +24,4 @@ for arg in $@; do
> esac
> done
>
> -exec guestfish --ro -i tar-out "$@"
> +exec -a "$0" guestfish --ro -i tar-out "$@"
LGTM.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20160226/7d0096ed/attachment.sig>
More information about the Libguestfs
mailing list