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
+
 usage() {
     UTIL=$(basename $0)
     cat <<EOF
-- 
2.35.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to