Skip to content

Commit

Permalink
Revert "放到后台提高运行速度。"
Browse files Browse the repository at this point in the history
This reverts commit 6c95893.
  • Loading branch information
Yongzhi Pan committed Jun 29, 2017
1 parent 6c95893 commit f58f503
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chnroutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def generate_linux(metric):
downfile.write('\n')

for ip,mask,_ in results:
upfile.write('route add -net %s netmask %s gw $OLDGW &\n'%(ip,mask))
downfile.write('route del -net %s netmask %s &\n'%(ip,mask))
upfile.write('route add -net %s netmask %s gw $OLDGW\n'%(ip,mask))
downfile.write('route del -net %s netmask %s\n'%(ip,mask))

downfile.write('rm /tmp/vpn_oldgw\n')

Expand Down Expand Up @@ -107,8 +107,8 @@ def generate_mac(metric):
downfile.write('\n')

for ip,_,mask in results:
upfile.write('route add %s/%s "${OLDGW}" &\n'%(ip,mask))
downfile.write('route delete %s/%s ${OLDGW} &\n'%(ip,mask))
upfile.write('route add %s/%s "${OLDGW}"\n'%(ip,mask))
downfile.write('route delete %s/%s ${OLDGW}\n'%(ip,mask))

downfile.write('\n\nrm /tmp/pptp_oldgw\n')
upfile.close()
Expand Down Expand Up @@ -181,8 +181,8 @@ def generate_android(metric):
downfile.write('\n')

for ip,mask,_ in results:
upfile.write('route add -net %s netmask %s gw $OLDGW &\n'%(ip,mask))
downfile.write('route del -net %s netmask %s &\n'%(ip,mask))
upfile.write('route add -net %s netmask %s gw $OLDGW\n'%(ip,mask))
downfile.write('route del -net %s netmask %s\n'%(ip,mask))

upfile.close()
downfile.close()
Expand Down

0 comments on commit f58f503

Please sign in to comment.