Last active
August 29, 2015 14:09
Revisions
-
loosebits revised this gist
Feb 1, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,9 +11,10 @@ fi GATEWAY="$(route -n get 8.8.8.8 | grep gateway | awk '{print $2}')" echo "Detected gateway to be $GATEWAY" scutil --nc start $PPPOE while ! ifconfig | grep $IFNAME > /dev/null; do sleep .2 done sleep 1 route change default $GATEWAY route add -net $SUBNET `ifconfig $IFNAME | grep inet | awk '{print $2}'` -
loosebits revised this gist
Nov 10, 2014 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ #! /bin/bash PPPOE=HCSC IFNAME=utun0 SUBNET="10.0.0.0/8" if [ $(id -u) != "0" ] then echo "Running using sudo.." @@ -7,10 +10,10 @@ then fi GATEWAY="$(route -n get 8.8.8.8 | grep gateway | awk '{print $2}')" echo "Detected gateway to be $GATEWAY" networksetup -connectpppoeservice $PPPOE while ! ifconfig | grep $IFNAME > /dev/null; do sleep .2 done route change default $GATEWAY route add -net $SUBNET `ifconfig $IFNAME | grep inet | awk '{print $2}'` -
loosebits revised this gist
Nov 10, 2014 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,11 @@ #! /bin/bash if [ $(id -u) != "0" ] then echo "Running using sudo.." sudo "$0" "$@" exit $? fi GATEWAY="$(route -n get 8.8.8.8 | grep gateway | awk '{print $2}')" echo "Detected gateway to be $gateway" networksetup -connectpppoeservice HCSC -
loosebits created this gist
Nov 10, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #! /bin/bash GATEWAY="$(route -n get 8.8.8.8 | grep gateway | awk '{print $2}')" echo "Detected gateway to be $gateway" networksetup -connectpppoeservice HCSC while ! ifconfig | grep utun0 > /dev/null; do sleep .2 done route change default $GATEWAY route add -net 10.0.0.0/8 `ifconfig utun0 | grep inet | awk '{print $2}'`