From 7b0f4e6e5e0db55450d2ecbe763f08f6a7a13a51 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sun, 22 Mar 2009 16:05:06 -0500 Subject: LinHES-config: Add support for adjusting the MTU from the network configuration screens. This addition pushed the buttons off the button of the screen, so the margins and divider lines needed to be removed. It's not very pretty but it works. --- abs/core-testing/LinHES-config/PKGBUILD | 2 +- abs/core-testing/LinHES-config/networkconfig.sh | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index d3d6353..ef2fa4d 100644 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=1.0 -pkgrel=342 +pkgrel=343 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev ) pkgdesc="Install and configure your system" depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan system-templates ) diff --git a/abs/core-testing/LinHES-config/networkconfig.sh b/abs/core-testing/LinHES-config/networkconfig.sh index 38b819a..770aa98 100644 --- a/abs/core-testing/LinHES-config/networkconfig.sh +++ b/abs/core-testing/LinHES-config/networkconfig.sh @@ -92,6 +92,7 @@ function setup_interfaces() { local KEY local ENCRYPT local TEMPNET + local MTU IS_WIRELESS=false #local ip @@ -118,6 +119,8 @@ function setup_interfaces() { TEMPNET=HOST_iswireless$1 eval wireless=\$${TEMPNET} + TEMPNET=HostMTU$1 + eval MTU=\$${TEMPNET} @@ -176,9 +179,6 @@ function setup_interfaces() { sed -i -e 's/^CONFIG_WIRLESS=.*$/CONFIG_WIRLESS=no/g' $ETCNETDIR/$1/options fi - - - if [ x$UseDHCP = x0 ] then echo using dhcp @@ -191,6 +191,16 @@ function setup_interfaces() { echo "$ip$netmask" > $ETCNETDIR/$1/ipv4address setup_nameserver $dns fi + + if [ x$MTU = x ] + then + echo "MTU is blank, card will use default values" + sed -i '/^mtu.*$/d' /etc/net/ifaces/$1/iplink + else + echo "setting mtu for $1 to $MTU" + sed -i '/^mtu.*$/d' /etc/net/ifaces/$1/iplink + echo "mtu $MTU " >> /etc/net/ifaces/$1/iplink + fi } -- cgit v0.12