[Libguestfs] [libnbd PATCH] nbdsh: Simplify the script

Daniel P. Berrangé berrange at redhat.com
Wed Jun 23 12:54:39 UTC 2021


On Tue, Jun 22, 2021 at 10:29:14PM +0300, Nir Soffer wrote:
> On Tue, Jun 22, 2021 at 9:20 PM Martin Kletzander <mkletzan at redhat.com> wrote:
> >
> > There is no need for any hacks if we just do what execution of the module would
> > have done.
> >
> > Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> > ---
> >  sh/nbdsh.in | 12 ++++--------
> >  1 file changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/sh/nbdsh.in b/sh/nbdsh.in
> > index d10f0c1b6b26..f66e2918d304 100644
> > --- a/sh/nbdsh.in
> > +++ b/sh/nbdsh.in
> > @@ -1,4 +1,4 @@
> > -#!/bin/sh -
> > +#!/usr/bin/env @PYTHON@
> 
> Do we really care about specific @PYTHON@?
> 
> If not we can use:
> 
>     #!/usr/bin/python3

That is not reliably portable, especially to non-Linux platforms
like *BSD as it isn't always in /usr/bin


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libguestfs mailing list