Created
July 31, 2012 03:12
-
-
Save celadevra/3213188 to your computer and use it in GitHub Desktop.
Fix chnroute minor bug under mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you use chnroutes.py generated ip-up to add to route table addresses | |
# that don't route through VPN, you may encounter error saying | |
# "bad address:\n $yourgateway" where $yourgateway is the gate way for | |
# non-VPN addresses. This is because the \n is not accepted by OS X's route | |
# command. Just remove the \n with another sed command: | |
OLDGW=`netstat -nr | grep '^default' | grep -v 'ppp' | sed 's/default *\([0-9\.]*\) .*/\1/' | sed '/^$/d'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment