boot2docker: remove ntp, sync with host clock every hour

For filesharing to work properly the VM and host clocks should be in-sync,
even if the host clock has drifted relative to a good external timesource.

This patch removes ntp from the VM and replaces it with an hourly
sync with the VM's RTC which is plumbed into `gmtime`/`localtime`
in `xhyve`.

Fixes [docker/pinata#229]

Signed-off-by: David Scott <dave.scott@unikernel.com>
This commit is contained in:
David Scott 2015-12-03 20:48:09 +00:00
parent bc24228bc3
commit 9fb2bbecc8
2 changed files with 3 additions and 3 deletions

View File

@ -1,2 +1,2 @@
# restart ntpd to combat laptop sleep + VM pause
0 * * * * killall ntpd > /dev/null 2>&1; /etc/rc.d/ntpd
# resync with the host clock every hour
0 * * * * hwclock -s

View File

@ -25,7 +25,7 @@ test -f "/var/lib/boot2docker/profile" && . "/var/lib/boot2docker/profile"
/etc/rc.d/hostname
# sync the clock
/etc/rc.d/ntpd &
#/etc/rc.d/ntpd &
# start cron
/etc/rc.d/crond