From c7bee4c6758d02589cf11dfdce37a4f39aaa6cac Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 31 Dec 2013 09:40:01 +0100 Subject: [PATCH] add mtu support for manual interfaces tested with classic linux interfaces/bridge and openvswitch interfaces Signed-off-by: Alexandre Derumier --- Makefile | 3 ++- debian/conffiles | 1 + mtu | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 mtu diff --git a/Makefile b/Makefile index dc15a87aa..9c8bf647d 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ aplupload: scp aplinfo/aplinfo.dat aplinfo.dat.gz aplinfo/aplinfo.dat.asc download1.proxmox.com:/home/ftp/appliances/ .PHONY: install -install: country.dat vznet.conf vzdump.conf vzdump-hook-script.pl pve-apt.conf pve-repo-ca-certificates.crt +install: country.dat vznet.conf vzdump.conf vzdump-hook-script.pl pve-apt.conf pve-repo-ca-certificates.crt mtu install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy install -D -m 0644 debian/pve.logrotate ${DESTDIR}/etc/logrotate.d/pve install -d ${DESTDIR}/usr/share/${PACKAGE} @@ -95,6 +95,7 @@ install: country.dat vznet.conf vzdump.conf vzdump-hook-script.pl pve-apt.conf p install -D -m 0644 pve-repo-ca-certificates.crt ${DESTDIR}/etc/apt/pve-repo-ca-certificates.crt install -D -m 0644 vzdump.conf ${DESTDIR}/etc/vzdump.conf install -D -m 0755 vznet.conf ${DESTDIR}/etc/vz/vznet.conf + install -D -m 0755 mtu ${DESTDIR}/etc/network/if-up.d/mtu install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl install -m 0644 copyright ${DOCDIR} install -m 0644 debian/changelog.Debian ${DOCDIR} diff --git a/debian/conffiles b/debian/conffiles index 798e71da3..43953c37a 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -12,3 +12,4 @@ /etc/apt/apt.conf.d/75pveconf /etc/apt/pve-repo-ca-certificates.crt /etc/apt/sources.list.d/pve-enterprise.list +/etc/network/if-up.d/mtu diff --git a/mtu b/mtu new file mode 100755 index 000000000..1369f4245 --- /dev/null +++ b/mtu @@ -0,0 +1,16 @@ +#!/bin/sh + +case "$IFACE" in + # Ignore any alias (#272891) which uses : + *:*) + exit 0 + ;; +esac + +if [ "$METHOD" != manual ]; then + exit 0 +fi + +if [ -n "$IF_MTU" ]; then + ip link set $IFACE mtu $IF_MTU +fi