diff options
-rw-r--r-- | meta-oe/recipes-support/ntp/files/ntp.conf | 1 | ||||
-rw-r--r-- | meta-oe/recipes-support/ntp/files/ntpd.service | 3 | ||||
-rw-r--r-- | meta-oe/recipes-support/ntp/files/ntpdate.service | 11 | ||||
-rw-r--r-- | meta-oe/recipes-support/ntp/ntp.inc | 3 | ||||
-rw-r--r-- | meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | 4 |
5 files changed, 18 insertions, 4 deletions
diff --git a/meta-oe/recipes-support/ntp/files/ntp.conf b/meta-oe/recipes-support/ntp/files/ntp.conf index 596482870..bf52440ce 100644 --- a/meta-oe/recipes-support/ntp/files/ntp.conf +++ b/meta-oe/recipes-support/ntp/files/ntp.conf | |||
@@ -7,6 +7,7 @@ driftfile /etc/ntp.drift | |||
7 | # as required, or change this. | 7 | # as required, or change this. |
8 | server pool.ntp.org | 8 | server pool.ntp.org |
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 | server 127.127.1.0 | 11 | server 127.127.1.0 |
11 | fudge 127.127.1.0 stratum 14 | 12 | fudge 127.127.1.0 stratum 14 |
12 | # Defining a default security setting | 13 | # Defining a default security setting |
diff --git a/meta-oe/recipes-support/ntp/files/ntpd.service b/meta-oe/recipes-support/ntp/files/ntpd.service index 420a0563a..bd87b1ea2 100644 --- a/meta-oe/recipes-support/ntp/files/ntpd.service +++ b/meta-oe/recipes-support/ntp/files/ntpd.service | |||
@@ -5,8 +5,7 @@ After=network.target | |||
5 | [Service] | 5 | [Service] |
6 | Type=forking | 6 | Type=forking |
7 | PIDFile=/run/ntpd.pid | 7 | PIDFile=/run/ntpd.pid |
8 | EnvironmentFile=/etc/ntp.conf | 8 | ExecStart=/usr/bin/ntpd -p /run/ntpd.pid |
9 | ExecStart=/usr/bin/ntpd $NTPD_ARGS -p /run/ntpd.pid | ||
10 | 9 | ||
11 | [Install] | 10 | [Install] |
12 | WantedBy=multi-user.target | 11 | WantedBy=multi-user.target |
diff --git a/meta-oe/recipes-support/ntp/files/ntpdate.service b/meta-oe/recipes-support/ntp/files/ntpdate.service new file mode 100644 index 000000000..b2bc63206 --- /dev/null +++ b/meta-oe/recipes-support/ntp/files/ntpdate.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Network Time Service (one-shot ntpdate mode) | ||
3 | Before=ntpd.service | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=/usr/bin/ntpd -q -g -x | ||
8 | RemainAfterExit=yes | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-oe/recipes-support/ntp/ntp.inc b/meta-oe/recipes-support/ntp/ntp.inc index b398b801e..1d740f00f 100644 --- a/meta-oe/recipes-support/ntp/ntp.inc +++ b/meta-oe/recipes-support/ntp/ntp.inc | |||
@@ -28,7 +28,8 @@ EXTRA_OECONF = "--without-openssl --without-crypto ac_cv_header_readline_history | |||
28 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" | 28 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" |
29 | 29 | ||
30 | PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils" | 30 | PACKAGES += "ntpdate ${PN}-bin ${PN}-tickadj ${PN}-utils" |
31 | # NOTE: you don't need ntpdate, use "ntpdc -q -g -x" | 31 | # NOTE: you don't need ntpdate, use "ntpd -q -g -x" |
32 | # or the ntpdate systemd service | ||
32 | 33 | ||
33 | # This should use rc.update | 34 | # This should use rc.update |
34 | FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/init.d/ntpdate" | 35 | FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/init.d/ntpdate" |
diff --git a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb index e2bb1a806..063d82a87 100644 --- a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb +++ b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require ntp.inc | 1 | require ntp.inc |
2 | 2 | ||
3 | PR = "r3" | 3 | PR = "r4" |
4 | 4 | ||
5 | inherit systemd | 5 | inherit systemd |
6 | 6 | ||
@@ -13,6 +13,7 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ | |||
13 | file://ntpd \ | 13 | file://ntpd \ |
14 | file://ntp.conf \ | 14 | file://ntp.conf \ |
15 | file://ntpdate \ | 15 | file://ntpdate \ |
16 | file://ntpdate.service \ | ||
16 | file://ntpd.service \ | 17 | file://ntpd.service \ |
17 | " | 18 | " |
18 | 19 | ||
@@ -29,6 +30,7 @@ do_install_append() { | |||
29 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d | 30 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d |
30 | 31 | ||
31 | install -d ${D}${base_libdir}/systemd/system | 32 | install -d ${D}${base_libdir}/systemd/system |
33 | install -m 0644 ${WORKDIR}/ntpdate.service ${D}${base_libdir}/systemd/system/ | ||
32 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/ | 34 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/ |
33 | } | 35 | } |
34 | 36 | ||