diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2008-06-03 21:51:14 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2008-06-03 21:51:14 +0000 |
commit | 1c4800743d22d675ccfa48364d8aa558e8b7407c (patch) | |
tree | ca4254cbe5dd5adb0ed8af1f87c26bc569403164 /bootscripts/contrib/sysconfig/network-devices/services/mtu | |
parent | 9faa3e27afb932894ace74854fbb76631022446b (diff) |
Moved bootscripts and udev-config to BOOK
Updated Makefile to automatically generate bootscript and udev-config tarballs
Updated licesnse to be the same as BLFS
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8548 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts/contrib/sysconfig/network-devices/services/mtu')
-rw-r--r-- | bootscripts/contrib/sysconfig/network-devices/services/mtu | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bootscripts/contrib/sysconfig/network-devices/services/mtu b/bootscripts/contrib/sysconfig/network-devices/services/mtu new file mode 100644 index 000000000..5a7de080e --- /dev/null +++ b/bootscripts/contrib/sysconfig/network-devices/services/mtu @@ -0,0 +1,45 @@ +#!/bin/sh +######################################################################## +# Begin $network_devices/services/mtu +# +# Description : Sets MTU per interface +# +# Authors : Nathan Coulson - nathan@linuxfromscratch.org +# Jim Gifford - jim@linuxfromscratch.org +# +# Version : 00.00 +# +# Notes : 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}" ] +then + boot_mesg "MTU variable missing from ${IFCONFIG}, cannot continue." ${FAILURE} + echo_failure + exit 1 +fi + +case "${2}" in + up) + boot_mesg "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 |