Fix problems with getdate installation
[hvlinux.git] / stage3 / pkg / getdate_rfc868
diff --git a/stage3/pkg/getdate_rfc868 b/stage3/pkg/getdate_rfc868
new file mode 100644 (file)
index 0000000..9731327
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+hvbuild_post()
+{
+    make installman
+
+    cat > /usr/local/bin/hvgetdate << EOF
+#!/bin/sh
+
+# Time server informations:
+# US VA: nist1.aol-va.truetime.com (205.188.185.33)
+# Location: AOL Time Warner facility, Dulles, Virginia
+# Synchronization: Lockclock Algorithm and ACTS dial-up, GPS-stabilized oscillator for short-term stabilization
+# Service Area: Eastern US
+# Access Policy: Open access for up to 20 queries per hour (one-day average) from any one address, others by arrangement
+# Contact: Judah Levine, jlevine@boulder.nist.gov, 303 492 7785
+NTP_HOST1=205.188.185.33
+
+#CA time.nrc.ca (132.246.168.148)
+#Location: National Research Council of Canada, Ottawa, Ontario, Canada
+#Geographic Coordinates: 45:27N, 75:37W
+#Synchronization: NTP V3 secondary (stratum 2), PC/Linux
+#Service Area: Canada
+#Access Policy: open access
+#Contact: time@nrc.ca
+#Note: time is an alias and the IP address may change; please use DNS.
+NTP_HOST2=132.246.168.148
+
+echo -n "Synchronizing kernel time via NTP server:"
+getdate -adjust 1 600 \${NTP_HOST1} \${NTP_HOST2}
+exit 0
+EOF
+    chmod 755 /usr/local/bin/hvgetdate
+
+    # Adding fcrontab entry
+    install -v -m644 ${SCRDIR}/misc/hvgetdate /etc/fcron/fcron.d
+}