[lxc-devel] [PATCH 2/2] Add lxc.network.mtu for lxc-debian
Ryousei Takano
ryousei at gmail.com
Thu Mar 19 14:57:46 UTC 2009
Hi Daniel,
This adds the lxc.network.mtu configuration for the lxc-debian script.
Signed-off-by: Ryousei Takano <takano-ryousei at aist.go.jp>
---
scripts/lxc-debian.in | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/scripts/lxc-debian.in b/scripts/lxc-debian.in
index d228386..14aa071 100755
--- a/scripts/lxc-debian.in
+++ b/scripts/lxc-debian.in
@@ -9,6 +9,7 @@ MNTFILE="mount.conf"
UTSNAME=
IPV4="172.20.0.21"
GATEWAY="172.20.0.1"
+MTU="1500"
# These paths are within the container so do not need to obey
configure prefixes
INTERFACES="/etc/network/interfaces"
@@ -69,6 +70,7 @@ iface eth0 inet static
address $IPV4
netmask 255.255.255.0
broadcast 0.0.0.0
+mtu $MTU
up route add default gw $GATEWAY
iface lo inet loopback
EOF
@@ -132,6 +134,7 @@ lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
+lxc.network.mtu = $MTU
lxc.mount = $MNTFILE
lxc.rootfs = $ROOTFS
lxc.cgroup.devices.deny = a
@@ -195,6 +198,14 @@ collect_information() {
GATEWAY=$_GATEWAY_
fi
+ # choose the MTU size
+ echo -n "What is the MTU size ? [$MTU] "
+ read _MTU_
+
+ if [ ! -z "$_MTU_" ]; then
+ MTU=$_MTU_
+ fi
+
ROOTFS="./rootfs.$NAME"
# choose the rootfs
echo -n "Specify the location of the rootfs [$ROOTFS] "
--
1.5.6.3
More information about the lxc-devel
mailing list