summaryrefslogtreecommitdiff
path: root/recipes-support/ntp
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-01-17 16:39:07 -0600
committerJohn Klug <john.klug@multitech.com>2017-01-17 16:39:07 -0600
commita55ba668fa18b75a00a8546a0408f90de39e7085 (patch)
tree75381da62cfb55abeb0eb0515b41d99dd569e310 /recipes-support/ntp
parentbf44a677041abcef9f224de290fcd5ad4cf37ea8 (diff)
downloadmeta-mlinux-a55ba668fa18b75a00a8546a0408f90de39e7085.tar.gz
meta-mlinux-a55ba668fa18b75a00a8546a0408f90de39e7085.tar.bz2
meta-mlinux-a55ba668fa18b75a00a8546a0408f90de39e7085.zip
Add ntpd config file item NTPD_ENABLED to enable/disable ntpd
Diffstat (limited to 'recipes-support/ntp')
-rw-r--r--recipes-support/ntp/files/ntpd-default1
-rw-r--r--recipes-support/ntp/files/ntpd-init.patch15
2 files changed, 14 insertions, 2 deletions
diff --git a/recipes-support/ntp/files/ntpd-default b/recipes-support/ntp/files/ntpd-default
index 4811f46..d4e13bd 100644
--- a/recipes-support/ntp/files/ntpd-default
+++ b/recipes-support/ntp/files/ntpd-default
@@ -1,3 +1,4 @@
+NTPD_ENABLED=1
# The GPSD_* parameters in this file are ignored
# if the uBlox GPS is not present.
diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch
index 05a6a8e..136edac 100644
--- a/recipes-support/ntp/files/ntpd-init.patch
+++ b/recipes-support/ntp/files/ntpd-init.patch
@@ -1,5 +1,6 @@
---- old/ntpd 2017-01-12 18:10:40.208157197 -0600
-+++ new/ntpd 2017-01-12 18:14:27.952154318 -0600
+diff -Naur old/ntpd new/ntpd
+--- old/ntpd 2017-01-17 16:26:47.427368196 -0600
++++ new/ntpd 2017-01-17 16:32:15.366116859 -0600
@@ -1,6 +1,8 @@
-#! /bin/sh
+#! /bin/bash
@@ -50,3 +51,13 @@
}
stopdaemon(){
echo -n "Stopping ntpd: "
+@@ -34,6 +55,9 @@
+
+ case "$1" in
+ start)
++ if ((NTPD_ENABLED != 1)) ; then
++ exit 0
++ fi
+ settick
+ startdaemon -g
+ ;;