Skip to content

Commit

Permalink
Merge pull request #24 from shendongming/master
Browse files Browse the repository at this point in the history
解决 mac 10.9 下 生成的 ip-up 脚本不能运行
  • Loading branch information
fivesheep committed Sep 21, 2014
2 parents 58267c3 + c55b2a5 commit de4736e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chnroutes.py
Expand Up @@ -70,7 +70,7 @@ def generate_mac(metric):
#!/bin/sh
export PATH="/bin:/sbin:/usr/sbin:/usr/bin"
OLDGW=`netstat -nr | grep '^default' | grep -v 'ppp' | sed 's/default *\\([0-9\.]*\\) .*/\\1/'`
OLDGW=`netstat -nr | grep '^default' | grep -v 'ppp' | sed 's/default *\\([0-9\.]*\\) .*/\\1/' | awk '{if($1){print $1}}'`
if [ ! -e /tmp/pptp_oldgw ]; then
echo "${OLDGW}" > /tmp/pptp_oldgw
Expand Down

0 comments on commit de4736e

Please sign in to comment.