#/bin/sh
#
#  This script setups the ubuntu guests up properly.
#


prefix=$i

#
#  Source our common functions
#
if [ -e /usr/lib/xen-tools/common.sh ]; then
   . /usr/lib/xen-tools/common.sh
else
   . ./hooks/common.sh
fi

chroot ${prefix} /usr/sbin/update-rc.d -f hwclock.sh remove
chroot ${prefix} /usr/sbin/update-rc.d -f hwclockfirst.sh remove
chroot ${prefix} rm -f /etc/udev/rules.d/85-hwclock.rules
chroot ${prefix} ln -sf /bin/true /sbin/hwclock

#
#  Change first console setting to xvc0 upstart
#
echo "xvc0" >> ${prefix}/etc/securetty
sed -i "s/tty1/xvc0/" ${prefix}/etc/event.d/tty1
