source: bootscripts-standard/contrib/sysconfig/network-devices/services/mtu@ b1bad43

Last change on this file since b1bad43 was 7125722, checked in by Jim Gifford <clfs@…>, 17 years ago

Import of Bootscripts

  • Property mode set to 100644
File size: 949 bytes
RevLine 
[7125722]1#!/bin/sh
2########################################################################
3# Begin $network_devices/services/mtu
4#
5# Description : Sets MTU per interface
6#
7# Authors : Nathan Coulson - nathan@linuxfromscratch.org
8# Jim Gifford - jim@linuxfromscratch.org
9#
10# Version : 00.00
11#
12# Notes : This sets the maximum amount of bytes that can be
13# transmitted within a packet. By default, this
14# value is set to 1500.
15#
16########################################################################
17
18. /etc/sysconfig/rc
19. ${rc_functions}
20. ${IFCONFIG}
21
22if [ -z "${MTU}" ]
23then
24 boot_mesg "MTU variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
25 echo_failure
26 exit 1
27fi
28
29case "${2}" in
30 up)
31 boot_mesg "Setting the MTU for ${1} to ${MTU}..."
32 echo "${MTU}" > "/sys/class/net/${1}/mtu"
33 evaluate_retval
34 ;;
35
36 down)
37 ;;
38
39 *)
40 echo "Usage: ${0} [interface] {up|down}"
41 exit 1
42 ;;
43esac
44
45# End $network_devices/services/mtu
Note: See TracBrowser for help on using the repository browser.