Richard W.M. Jones
2016-Feb-25 11:39 UTC
[Libguestfs] [PATCH] fish: Set program name correctly for virt-{copy, tar}-{in, out} programs.
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 "$@" -- 2.5.0
Pino Toscano
2016-Feb-26 10:54 UTC
Re: [Libguestfs] [PATCH] fish: Set program name correctly for virt-{copy, tar}-{in, out} programs.
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
Reasonably Related Threads
- [LLVMdev] Enable debug for MSP430
- Service.services bug (pure Ruby version)
- [kde-workspace] kwin/libkdecorations: KDecorationBridge becomes private again
- [PATCH] libxc/arm: Correctly handle the difference between virtual and physical address
- Tabular datos de Encuesta Continua de Hogares