IFACE=eth1
IPADDR=`ifconfig eth1| grep 'inet addr'| sed -e 's/.*addr://' -e 's/ .*//'`
export IPADDR
# The tweak the ephemeral image to set the clock
mount /var/lib/maas/ephemeral/precise/ephemeral/amd64/20120424/disk.img /mnt/
chroot /mnt
apt-get update
cat >> /etc/init/cloud-init.conf << END
pre-start script
ntpdate -p 8 ${IPADDR}
hwclock -w
end script
END
exit
umount /mnt
Thanks for the work around Scott. I installed ntp on the MAAS-server and tweaked the ephemeral image to use ntpdate from it:
apt-get -q -y install ntpdate
ntpdate -p 8 SOME.PUBLIC.SERVER
apt-get -q -y install ntp ntp-doc
IFACE=eth1 maas/ephemeral/ precise/ ephemeral/ amd64/20120424/ disk.img /mnt/ cloud-init. conf << END
IPADDR=`ifconfig eth1| grep 'inet addr'| sed -e 's/.*addr://' -e 's/ .*//'`
export IPADDR
# The tweak the ephemeral image to set the clock
mount /var/lib/
chroot /mnt
apt-get update
cat >> /etc/init/
pre-start script
ntpdate -p 8 ${IPADDR}
hwclock -w
end script
END
exit
umount /mnt
# after that, the nodes boot and configure!