Hello Adrian, On Fri, May 6, 2022 at 12:11 PM Adrian Moreno <[email protected]> wrote: > > If openvswitch is not installed in the default system's path ovs-save > script will fail to find the tools it requires. > > Fix this by adding $bindir to the PATH. > > Signed-off-by: Adrian Moreno <[email protected]> > --- > utilities/ovs-save | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/utilities/ovs-save b/utilities/ovs-save > index fb2025b76..b3529ed78 100755 > --- a/utilities/ovs-save > +++ b/utilities/ovs-save > @@ -20,6 +20,17 @@ case $0 in > esac > . "$dir0/ovs-lib" || exit 1 > > +for dir in "$bindir" /sbin /bin /usr/sbin /usr/bin; do > + case :$PATH: in > + *:$dir:*) ;; > + *) > + case $dir in > + $bindir) PATH=$dir:$PATH ;; > + *) PATH=$PATH:$dir ;; > + esac > + esac > +done > +
Seeing how we have similar code in other scripts (ovs-ctl, ovs-kmod-ctl), would it make sense to move this to ovs-lib? -- David Marchand _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
