From a55ba668fa18b75a00a8546a0408f90de39e7085 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 17 Jan 2017 16:39:07 -0600 Subject: Add ntpd config file item NTPD_ENABLED to enable/disable ntpd --- recipes-support/ntp/files/ntpd-default | 1 + recipes-support/ntp/files/ntpd-init.patch | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'recipes-support') 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 + ;; -- cgit v1.2.3