[ovs-dev] [PATCH 2/3] ovs-save: compatible with busybox ip command

Yousong Zhou yszhou4tech at gmail.com
Fri Nov 30 07:30:03 UTC 2018


From: Yousong Zhou <yszhou4tech at gmail.com>

Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
use `ip link show` to cover both iproute2 and busybox ip command

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 utilities/ovs-save | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/ovs-save b/utilities/ovs-save
index bcb8e9b8a..1ba36e9de 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -38,7 +38,7 @@ EOF
 }
 
 save_interfaces () {
-    if (ip -V) > /dev/null 2>&1; then :; else
+    if (ip link show) > /dev/null 2>&1; then :; else
         echo "$0: ip not found in $PATH" >&2
         exit 1
     fi


More information about the dev mailing list