summaryrefslogtreecommitdiff
path: root/recipes-support
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2016-12-20 18:13:03 -0600
committerJohn Klug <john.klug@multitech.com>2016-12-20 18:13:03 -0600
commit179371d9381f86c0d68e0c981ef3fc5dce830aaa (patch)
tree5d54534e5854eae13a8c461dd29b877980aec816 /recipes-support
parent0f102a28f8323576eadfc20f95050f826197f665 (diff)
parentb2440edd24018fab7cff1e75ba66f1491d7dad60 (diff)
downloadmeta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.tar.gz
meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.tar.bz2
meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.zip
Merge gpsd changes to mlinux gitlab master
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/ntp/files/ntp.conf.patch51
-rw-r--r--recipes-support/ntp/files/ntpd-init.patch11
-rw-r--r--recipes-support/ntp/ntp_4.2.6p5.bbappend22
3 files changed, 84 insertions, 0 deletions
diff --git a/recipes-support/ntp/files/ntp.conf.patch b/recipes-support/ntp/files/ntp.conf.patch
new file mode 100644
index 0000000..0700553
--- /dev/null
+++ b/recipes-support/ntp/files/ntp.conf.patch
@@ -0,0 +1,51 @@
+diff -u old/ntp.conf new/ntp.conf
+--- old/ntp.conf 2016-12-20 15:41:04.992738081 -0600
++++ new/ntp.conf 2016-12-20 16:07:40.632709506 -0600
+@@ -1,7 +1,19 @@
+-# This is the most basic ntp configuration file
+ # The driftfile must remain in a place specific to this
+ # machine - it records the machine specific clock error
+ driftfile /etc/ntp.drift
++
++# The following code is for evaluating the timeserver.
++# Remove the # to activate the statistics
++# statistics loopstats
++# statistics peerstats
++# statsdir /var/log/ntpstats
++# filegen peerstats file peerstats type day link enable
++# filegen loopstats file loopstats type day link enable
++
++# This is the US timeserver pool. You should use a pool
++# close to your location.
++#pool us.pool.ntp.org iburst
++
+ # This should be a server that is close (in IP terms)
+ # to the machine. Add other servers as required.
+ # Unless you un-comment the line below ntpd will sync
+@@ -9,8 +21,26 @@
+ #
+ # server time.server.example.com
+ #
++
++logfile /var/log/ntp.log
++
++restrict default kod nomodify notrap nopeer noquery
++restrict -6 default kod nomodify notrap nopeer noquery
++restrict 127.0.0.1 mask 255.255.255.0
++restrict -6 ::1
++
++# GPS Serial data reference (NTP0)
++server 127.127.28.0
++fudge 127.127.28.0 time1 0.080 refid GPS
++
++# GPS PPS reference (NTP2)
++server 127.127.28.2 prefer
++fudge 127.127.28.2 time1 0.000 refid PPS
++
+ # Using local hardware clock as fallback
+ # Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
++# The stratum should be a high value so this does not get chosen
++# except in dire circumstances.
+ server 127.127.1.0
+ fudge 127.127.1.0 stratum 14
+ # Defining a default security setting
diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch
new file mode 100644
index 0000000..fc388f8
--- /dev/null
+++ b/recipes-support/ntp/files/ntpd-init.patch
@@ -0,0 +1,11 @@
+--- old/ntpd 2016-12-19 18:11:58.022663976 -0600
++++ new/ntpd 2016-12-19 18:12:56.618663852 -0600
+@@ -23,7 +23,7 @@
+ # this. If ntpd seems to disappear after a while assume TICKADJ
+ # above is set to a totally incorrect value.
+ echo -n "Starting ntpd: "
+- start-stop-daemon --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@"
++ start-stop-daemon -N -20 --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@"
+ echo "done"
+ }
+ stopdaemon(){
diff --git a/recipes-support/ntp/ntp_4.2.6p5.bbappend b/recipes-support/ntp/ntp_4.2.6p5.bbappend
new file mode 100644
index 0000000..9c6419e
--- /dev/null
+++ b/recipes-support/ntp/ntp_4.2.6p5.bbappend
@@ -0,0 +1,22 @@
+PR .= ".mlinux1"
+
+SRC_URI += " file://ntpd-init.patch;patchdir=.. \
+ file://ntp.conf.patch;patchdir=.. \
+ "
+FILESEXTRAPATHS_prepend := "${THISDIR}/files"
+
+python do_patch_prepend () {
+ import os
+}
+pkg_postinst_${PN} () {
+ touch /etc/ntp.drift
+ chown ntp:ntp /etc/ntp.drift
+ chmod 664 /etc/ntp.drift
+ if ! [[ -d /var/log/ntpstats ]] ; then
+ mkdir -p /var/log/ntpstats
+ fi
+
+ chown ntp:ntp /var/log/ntpstats
+ chmod 775 /var/log/ntpstats
+}
+