#!/bin/sh # # set-mtu # # Copyright 2005, Stichting Wireleess Leiden, All rights reserved. # See http://www.wirelessleiden.nl/LICENSE for licensing information. # # Lowers the MTU and sets up separate routing to Wireless Leiden # # Typically lives in /System/Library/SystemConfiguration/Kicker.bundle/Contents/Resources/ # . /etc/hostconfig ME=set-mtu if ifconfig | grep -q ppp0 && ifconfig ppp0 | grep -q 80.100.36 then ifconfig ppp0 mtu 1350 &&\ logger -i -p daemon.notice -t ${ME} set MTU to 1350 for WL/HCC GW=`netstat -nr -f inet | grep UHLW | awk '{ print $1 }'` route -q delete 172.16.0.0/12 route -q add 172.16.0.0/12 $GW &&\ logger -i -p daemon.notice -t ${ME} Added route to WLeiden which bypasses the PPTP vpn to the internet. else netstat -nr -f inet | grep -q 172.16/12 &&\ route -q delete 172.16.0.0/12 &&\ logger -i -p daemon.notice -t ${ME} Removed WLeiden route. logger -i -p daemon.notice -t ${ME} MTU left untouched. fi exit 0