From 35beda48f3b1679484ed97423842c9f557dc79e1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 19 Jan 2015 18:47:46 +0100 Subject: [PATCH] use cron to run ntpdate --- vm/firstboot.sh | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/vm/firstboot.sh b/vm/firstboot.sh index 2f60e30a1..8a2ff2b69 100755 --- a/vm/firstboot.sh +++ b/vm/firstboot.sh @@ -159,15 +159,11 @@ if [ "$LXC" == "yes" ]; then fi if [ "$LXC" == "no" ]; then -cat > /usr/local/bin/fixtime </dev/null - sleep 600 -done +cat > /etc/cron.d/ntp_fixtime </dev/null EOF -chmod +x /usr/local/bin/fixtime -fi cat > /usr/local/bin/genissue < /etc/rc.local << EOF #!/bin/sh -e -#vm has one network interface and that might change, make it not persistent +#vm has one network interface and that might change, make sure its not persistent rm -f /etc/udev/rules.d/70-persistent-net.rules #update issue /usr/local/bin/genissue > /etc/issue EOF -if [ "$LXC" == "no" ]; then -cat >> /etc/rc.local << EOF - -#vm can be suspended, this help to keep the time in sync -/usr/local/bin/fixtime & -EOF -fi - chmod +x /etc/rc.local +apt-get clean cat > /home/pandora/.vimrc < :set invpaste paste? set pastetoggle= set showmode EOF -apt-get clean