Last change
on this file since a483775 was 7df280d, checked in by Joe Ciccone <jciccone@…>, 17 years ago |
Change /bin/sh to /bin/bash in the bootscripts because the bootscripts use bashisms. Having ash linked to sh will cause errors. Thanks to Bigdassaved for providing the diff and Copper for bring up the issue.
|
-
Property mode
set to
100644
|
File size:
951 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
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 |
|
---|
22 | if [ -z "${MTU}" ]
|
---|
23 | then
|
---|
24 | boot_mesg "MTU variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
|
---|
25 | echo_failure
|
---|
26 | exit 1
|
---|
27 | fi
|
---|
28 |
|
---|
29 | case "${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 | ;;
|
---|
43 | esac
|
---|
44 |
|
---|
45 | # End $network_devices/services/mtu
|
---|
Note:
See
TracBrowser
for help on using the repository browser.