#!/bin/sh
# file /etc/network/if-up.d/mtu
# Criado em:Seg 03/Out/2011 hs 16:21
# Last Change: 2011 Out 03, 16:32:44
# vim:ft=sh:fdm=syntax:nu:
# Instituicao: none
# Proposito do script: ajustar o mtu da placa de rede
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
# twitter: http://www.twitter.com/voyeg3r

# how use this script:
# save this file in /etc/network/if-up.d/mtu
# chmod 700 /etc/network/if-up.d/mtu
# restart yout network card :)

# source: http://monespaceperso.org/blog-en/2009/02/26/how-to-change-the-default-mtu-of-a-network-card-on-ubuntu/

# get default network interface
DEV=`netstat -i | awk '/eth/ {print $1}'`

# set mtu to default card interface
ifconfig $DEV mtu 1492