Skip to content

Commit

Permalink
解决 mac 10.9 下 生成的 ip-up 脚本不能运行
Browse files Browse the repository at this point in the history
OLDGW=`netstat -nr | grep '^default' | grep -v 'ppp' | sed 's/default
*\\([0-9\.]*\\) .*/\\1/' | awk '{if($1){print $1}}'`
去掉 oldgw 前面多余的空行
  • Loading branch information
shendongming committed Aug 5, 2014
1 parent efc4578 commit c55b2a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chnroutes.py
Original file line number Diff line number Diff line change
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 c55b2a5

Please sign in to comment.