source: bootscripts/contrib/sysconfig/network-devices/services/mtu@ 163a6701

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 163a6701 was 163a6701, checked in by Jim Gifford <clfs@…>, 19 years ago

r720@server (orig r718): jim | 2005-11-18 08:06:26 -0800
Added bootscripts to cross-lfs svn

  • Property mode set to 100644
File size: 949 bytes
Line 
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.