2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 22:39:32 +00:00

Add mtu option setting for lxc-debian

This patch adds the mtu option setting for the lxc-debian script.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Ryousei Takano
2009-03-26 19:21:42 +09:00
committed by Daniel Lezcano
parent eb14c10a41
commit 81f6a40acf

View File

@@ -9,6 +9,7 @@ MNTFILE="mount.conf"
UTSNAME= UTSNAME=
IPV4="172.20.0.21" IPV4="172.20.0.21"
GATEWAY="172.20.0.1" GATEWAY="172.20.0.1"
MTU="1500"
# These paths are within the container so do not need to obey configure prefixes # These paths are within the container so do not need to obey configure prefixes
INTERFACES="/etc/network/interfaces" INTERFACES="/etc/network/interfaces"
@@ -69,6 +70,7 @@ iface eth0 inet static
address $IPV4 address $IPV4
netmask 255.255.255.0 netmask 255.255.255.0
broadcast 0.0.0.0 broadcast 0.0.0.0
mtu $MTU
up route add default gw $GATEWAY up route add default gw $GATEWAY
iface lo inet loopback iface lo inet loopback
EOF EOF
@@ -132,6 +134,7 @@ lxc.network.type = veth
lxc.network.flags = up lxc.network.flags = up
lxc.network.link = br0 lxc.network.link = br0
lxc.network.name = eth0 lxc.network.name = eth0
lxc.network.mtu = $MTU
lxc.mount = $MNTFILE lxc.mount = $MNTFILE
lxc.rootfs = $ROOTFS lxc.rootfs = $ROOTFS
lxc.cgroup.devices.deny = a lxc.cgroup.devices.deny = a
@@ -195,6 +198,14 @@ collect_information() {
GATEWAY=$_GATEWAY_ GATEWAY=$_GATEWAY_
fi 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" ROOTFS="./rootfs.$NAME"
# choose the rootfs # choose the rootfs
echo -n "Specify the location of the rootfs [$ROOTFS] " echo -n "Specify the location of the rootfs [$ROOTFS] "