diff options
author | John Klug <john.klug@multitech.com> | 2017-01-20 16:32:04 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-01-20 16:32:04 -0600 |
commit | 49abc027832e86a0b919ea6e2ddf2fa2e24a2979 (patch) | |
tree | 67f9dd24ba86d51bc84255caba2faf971a3fc5b7 /recipes-support | |
parent | d07f3c058d205d73795dcdf4c82c0988523cb275 (diff) | |
download | meta-mlinux-49abc027832e86a0b919ea6e2ddf2fa2e24a2979.tar.gz meta-mlinux-49abc027832e86a0b919ea6e2ddf2fa2e24a2979.tar.bz2 meta-mlinux-49abc027832e86a0b919ea6e2ddf2fa2e24a2979.zip |
Use flag ENABLED in /etc/default like other MTS services
Diffstat (limited to 'recipes-support')
-rw-r--r-- | recipes-support/ntp/files/ntpd-init.patch | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch index 136edac..41c7549 100644 --- a/recipes-support/ntp/files/ntpd-init.patch +++ b/recipes-support/ntp/files/ntpd-init.patch @@ -1,6 +1,6 @@ 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 ++++ new/ntpd 2017-01-20 16:26:52.154738981 -0600 @@ -1,6 +1,8 @@ -#! /bin/sh +#! /bin/bash @@ -51,13 +51,37 @@ diff -Naur old/ntpd new/ntpd } stopdaemon(){ echo -n "Stopping ntpd: " -@@ -34,6 +55,9 @@ +@@ -34,24 +55,27 @@ case "$1" in start) -+ if ((NTPD_ENABLED != 1)) ; then -+ exit 0 -+ fi - settick +- settick ++ if ! [[ $ENABLED =~ ^[yY][eE][sS]$ ]] ; then ++ exit 0 ++ fi ++ settick + startdaemon -g + ;; + stop) +- stopdaemon ++ stopdaemon + ;; + force-reload) +- stopdaemon +- settick ++ stopdaemon ++ settick startdaemon -g ;; + restart) +- # Don't reset the tick here ++ # Don't reset the tick here + stopdaemon + startdaemon -g + ;; + reload) +- # Must do this by hand, but don't do -g ++ # Must do this by hand, but don't do -g + stopdaemon + startdaemon + ;; |