You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/10/25 10:58:15 UTC

[GitHub] rhtyd closed pull request #2923: Improved perfomance on creating VM (KVM)

rhtyd closed pull request #2923: Improved perfomance on creating VM (KVM)
URL: https://github.com/apache/cloudstack/pull/2923
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scripts/vm/network/vnet/modifyvlan.sh b/scripts/vm/network/vnet/modifyvlan.sh
index 24a38a18050..affa7780a9f 100755
--- a/scripts/vm/network/vnet/modifyvlan.sh
+++ b/scripts/vm/network/vnet/modifyvlan.sh
@@ -48,11 +48,7 @@ addVlan() {
 	fi
 	
 	# is up?
-  	ifconfig |grep -w $vlanDev > /dev/null
-	if [ $? -gt 0 ]
-	then
-		ifconfig $vlanDev up > /dev/null
-	fi
+	ip link set $vlanDev up > /dev/null 2>/dev/null
 	
 	if [ ! -d /sys/class/net/$vlanBr ]
 	then
@@ -86,11 +82,7 @@ addVlan() {
 		fi
 	fi
 	# is vlanBr up?
-	ifconfig |grep -w $vlanBr > /dev/null
-	if [ $? -gt 0 ]
-	then
-		ifconfig $vlanBr up
-	fi
+	ip link set $vlanBr up > /dev/null 2>/dev/null
 
 	return 0
 }
@@ -109,7 +101,7 @@ deleteVlan() {
 		return 1
 	fi	
 
-	ifconfig $vlanBr down
+	ip link set $vlanBr down
 	
 	if [ $? -gt 0 ]
 	then


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services