#!/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
