#!/bin/sh
# Begin $network_devices/services/mtu

# Written by Nathan Coulson <nathan@linuxfromscratch.org>
# based upon the work of Jim Gifford <jim@linuxfromscratch.org>

# This sets the maximum amount of bytes that can be transmitted within
# a packet.  By default, this value is set to 1500.

. /etc/sysconfig/rc 
. $rc_functions 
. $IFCONFIG

if [ -z "$MTU"l; then
	echo "MTU variable missing from $IFCONFIG, cannot continue"
	exit 1
fi

case "$2" in
	up)
		echo "Setting the MTU for $1 to $MTU"
		echo "$MTU" > "/sys/class/net/$1/mtu"
		evaluate_retval
	;;
	
	down)
	;;
	
	*)
		echo "Usage: $0 [interface] {up|down}"
		exit 1
	;;
esac

# End $network_devices/services/mtu
