Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
91yun committed Mar 24, 2016
1 parent df00f38 commit e80682c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion serverspeeder-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,12 @@ rm -rf serverspeederbin.txt
# echo NETCARD=$NETCARD

if [ "$1" == "" ]; then
MACSTR="LANG=C ifconfig eth0 | awk '/ether/{ print \$2 }' "
MACSTR="LANG=C ifconfig eth0 | awk '/HWaddr/{ print \$5 }' "
MAC=$(eval $MACSTR)
if [ "$MAC" == "" ]; then
MACSTR="LANG=C ifconfig eth0 | awk '/ether/{ print \$2 }' "
MAC=$(eval $MACSTR)
fi
if [ "$MAC" == "" ]; then
MAC=$(ip link | awk -F ether '{print $2}' | awk NF | awk 'NR==1{print $1}')
fi
Expand Down

0 comments on commit e80682c

Please sign in to comment.