Add a hook to invirt-autoinstaller to turn off checksumming in the guest
[invirt/packages/invirt-autoinstaller.git] / common / usr / lib / xen-tools / debian.d / 98-fix-eth-checksums
diff --git a/common/usr/lib/xen-tools/debian.d/98-fix-eth-checksums b/common/usr/lib/xen-tools/debian.d/98-fix-eth-checksums
new file mode 100755 (executable)
index 0000000..b0233c8
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+#  This script disables checksumming within the domU
+#
+
+prefix=$1
+
+#
+#  Source the common functions
+#
+if [ -e /usr/lib/xen-tools/common.sh ]; then
+    . /usr/lib/xen-tools/common.sh
+else
+    . ./hooks/common.sh
+fi
+
+logMessage Script $0 starting
+
+# To avoid UDP checksum problems.
+installDebianPackage ${prefix} ethtool
+
+sed -i'' -e 's/exit 0/ethtool -K eth0 tx off\n\0/' ${prefix}/etc/rc.local
+
+#
+# Log our finish
+#
+logMessage Script $0 finished