diff options
Diffstat (limited to 'meta-networking/recipes-support/ntp/files')
-rw-r--r-- | meta-networking/recipes-support/ntp/files/ntp.conf | 2 | ||||
-rwxr-xr-x | meta-networking/recipes-support/ntp/files/ntpdate | 11 | ||||
-rw-r--r-- | meta-networking/recipes-support/ntp/files/ntpdate.default | 7 |
3 files changed, 16 insertions, 4 deletions
diff --git a/meta-networking/recipes-support/ntp/files/ntp.conf b/meta-networking/recipes-support/ntp/files/ntp.conf index bf52440ce..a9cc83845 100644 --- a/meta-networking/recipes-support/ntp/files/ntp.conf +++ b/meta-networking/recipes-support/ntp/files/ntp.conf | |||
@@ -5,7 +5,7 @@ driftfile /etc/ntp.drift | |||
5 | # This obtains a random server which will be close | 5 | # This obtains a random server which will be close |
6 | # (in IP terms) to the machine. Add other servers | 6 | # (in IP terms) to the machine. Add other servers |
7 | # as required, or change this. | 7 | # as required, or change this. |
8 | server pool.ntp.org | 8 | server time.server.example.com |
9 | # Using local hardware clock as fallback | 9 | # Using local hardware clock as fallback |
10 | # Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself | 10 | # Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself |
11 | server 127.127.1.0 | 11 | server 127.127.1.0 |
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 | ||
7 | if test -f /etc/default/ntpdate ; then | 7 | if test -f /etc/default/ntpdate ; then |
8 | . /etc/default/ntpdate | 8 | . /etc/default/ntpdate |
9 | else | ||
10 | NTPSERVERS="pool.ntp.org" | ||
11 | fi | 9 | fi |
12 | 10 | ||
13 | test -n "$NTPSERVERS" || exit 0 | 11 | if [ "$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 | ||
18 | fi | ||
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 |
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate.default b/meta-networking/recipes-support/ntp/files/ntpdate.default new file mode 100644 index 000000000..486b6e07d --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntpdate.default | |||
@@ -0,0 +1,7 @@ | |||
1 | # Configuration script used by ntpdate-sync script | ||
2 | |||
3 | NTPSERVERS="" | ||
4 | |||
5 | # Set to "yes" to write time to hardware clock on success | ||
6 | UPDATE_HWCLOCK="no" | ||
7 | |||