From db97914eb4fb52da72fefb4517b0fefc763a32e2 Mon Sep 17 00:00:00 2001 From: Munkyu Im Date: Thu, 8 Oct 2015 15:25:13 +0900 Subject: [PATCH] net: modify script file for setting bridge network - fix if statement - modify log Change-Id: Ie9841bf824680fa0106c596f102a2d3a9170381d Signed-off-by: Munkyu Im --- tizen/src/scripts/emulator-ifup-linux.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tizen/src/scripts/emulator-ifup-linux.sh b/tizen/src/scripts/emulator-ifup-linux.sh index e111dcffad..13a057d9cc 100755 --- a/tizen/src/scripts/emulator-ifup-linux.sh +++ b/tizen/src/scripts/emulator-ifup-linux.sh @@ -3,7 +3,7 @@ # $1: tap name # $2: interface name could be eth0 or bridge name -if [ "$2" == "" ];then +if [ "x$2" = "x" ];then NETMASK="" else NETMASK=`ifconfig $2 | grep "inet " | awk '{print $4}' | cut -d : -f2` @@ -15,7 +15,7 @@ echo "GW: $GW" echo "Check if bridge interface exists." echo "CHECK_BR=`/bin/ls /sys/class/net | grep $BR`" CHECK_BR=`/bin/ls /sys/class/net | grep $BR` -if [ "$CHECK_BR" = "" ] +if [ "x$CHECK_BR" = "x" ] then echo "$BR does not exist! create it" BASEIPADDR=`ip addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1` @@ -38,12 +38,12 @@ fi brctl addif $BR $1 echo "Add the default route." -if [ "$NETMASK" == "" ];then +if [ "x$NETMASK" = "x" ];then echo "netmask is NULL" - echo ifconfig $BR $BASEIPADDR + echo "ifconfig $BR $BASEIPADDR" ifconfig $BR $BASEIPADDR else - echo ifconfig $BR $BASEIPADDR netmask $NETMASK + echo "ifconfig $BR $BASEIPADDR netmask $NETMASK" ifconfig $BR $BASEIPADDR netmask $NETMASK fi NET=`netstat -rn | grep ^0.0.0.0 | awk '{print $8}'` -- 2.34.1