[packages/lxd] - use 'ip link show up'

mis mis at pld-linux.org
Mon Aug 22 18:28:58 CEST 2016


commit f64fdf35ad86b4d410499819ef0263ee06e85016
Author: mis <mis at pld-linux.org>
Date:   Mon Aug 22 18:28:23 2016 +0200

    - use 'ip link show up'

 lxd.init   | 2 +-
 lxdbr.init | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lxd.init b/lxd.init
index b24b72d..2bf5fa4 100755
--- a/lxd.init
+++ b/lxd.init
@@ -38,7 +38,7 @@ start() {
 	fi
 
 	if [ -n "$BRIDGE_DEV" ]; then
-		if ! ip link show $BRIDGE_DEV 2>/dev/null | grep -q ",UP,"; then
+		if ! ip link show $BRIDGE_DEV up 2>/dev/null | grep -q $BRIDGE_DEV; then
 			nls "lxd bridge %s is down, start lxdbr service first" "$BRIDGE_DEV"
 			RETVAL=1
 			return
diff --git a/lxdbr.init b/lxdbr.init
index b07e748..93a34fc 100755
--- a/lxdbr.init
+++ b/lxdbr.init
@@ -29,7 +29,7 @@ if [ -z "$BRIDGE_DEV" -o -z "$BRIDGE_IPADDR" ]; then
 fi
 
 is_bridge_up() {
-	ip link show $BRIDGE_DEV 2>/dev/null | grep -q ",UP"
+	ip link show $BRIDGE_DEV up 2>/dev/null | grep -q $BRIDGE_DEV
 }
 
 start() {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lxd.git/commitdiff/f64fdf35ad86b4d410499819ef0263ee06e85016



More information about the pld-cvs-commit mailing list