summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp/files/ntpdate
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/ntp/files/ntpdate')
-rwxr-xr-xmeta-networking/recipes-support/ntp/files/ntpdate11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate b/meta-networking/recipes-support/ntp/files/ntpdate
index 784b029ad..ab0551c5a 100755
--- a/meta-networking/recipes-support/ntp/files/ntpdate
+++ b/meta-networking/recipes-support/ntp/files/ntpdate
@@ -6,11 +6,16 @@ test -x /usr/bin/ntpdate || exit 0
6 6
7if test -f /etc/default/ntpdate ; then 7if test -f /etc/default/ntpdate ; then
8. /etc/default/ntpdate 8. /etc/default/ntpdate
9else
10NTPSERVERS="pool.ntp.org"
11fi 9fi
12 10
13test -n "$NTPSERVERS" || exit 0 11if [ "$NTPSERVERS" = "" ] ; then
12 if [ "$METHOD" = "" -a "$1" != "silent" ] ; then
13 echo "Please set NTPSERVERS in /etc/default/ntpdate"
14 exit 1
15 else
16 exit 0
17 fi
18fi
14 19
15# This is a heuristic: The idea is that if a static interface is brought 20# This is a heuristic: The idea is that if a static interface is brought
16# up, that is a major event, and we can put in some extra effort to fix 21# up, that is a major event, and we can put in some extra effort to fix