mirror of
git://github.com/lxc/lxc
synced 2025-08-31 20:57:02 +00:00
Add mtu option setting for lxc-fedora
This patch adds the mtu option setting for the lxc-fedora 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:
committed by
Daniel Lezcano
parent
81f6a40acf
commit
b44cb779a1
@@ -11,6 +11,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
|
||||||
INITTAB="/etc/inittab"
|
INITTAB="/etc/inittab"
|
||||||
@@ -85,6 +86,7 @@ NETWORK=$(ipcalc -sn ${IPV4} 255.255.255.0)
|
|||||||
GATEWAY=${GATEWAY}
|
GATEWAY=${GATEWAY}
|
||||||
BROADCAST=$(ipcalc -sb ${IPV4} 255.255.255.0)
|
BROADCAST=$(ipcalc -sb ${IPV4} 255.255.255.0)
|
||||||
NETMASK=255.255.255.0
|
NETMASK=255.255.255.0
|
||||||
|
MTU=${MTU}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +137,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
|
||||||
@@ -200,6 +203,14 @@ create() {
|
|||||||
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
|
||||||
|
|
||||||
# the rootfs name will be build with the container name
|
# the rootfs name will be build with the container name
|
||||||
ROOTFS="./rootfs.${NAME}"
|
ROOTFS="./rootfs.${NAME}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user