ntp: Add systemd service files + ODU specific configuration
On the ODU, we have a local GPS/GNSS receiver as prefision time source.
This commit is contained in:
parent
5de4108c11
commit
d7e88c9356
|
@ -0,0 +1,19 @@
|
||||||
|
# This is the most basic ntp configuration file
|
||||||
|
# The driftfile must remain in a place specific to this
|
||||||
|
# machine - it records the machine specific clock error
|
||||||
|
driftfile /etc/ntp.drift
|
||||||
|
# This obtains a random server which will be close
|
||||||
|
# (in IP terms) to the machine. Add other servers
|
||||||
|
# as required, or change this.
|
||||||
|
server pool.ntp.org
|
||||||
|
# Using local hardware clock as fallback
|
||||||
|
# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
|
||||||
|
server 127.127.1.0
|
||||||
|
fudge 127.127.1.0 stratum 14
|
||||||
|
|
||||||
|
server 127.127.28.0
|
||||||
|
fudge 127.127.28.0 refid GPS
|
||||||
|
|
||||||
|
# Defining a default security setting, allowing queries but declining
|
||||||
|
# pretty much everything else
|
||||||
|
restrict default limited kod nomodify notrap nopeer
|
|
@ -1,11 +1,6 @@
|
||||||
require ntp.inc
|
require ntp.inc
|
||||||
|
|
||||||
PR = "r5"
|
PR = "r6"
|
||||||
|
|
||||||
#inherit systemd
|
|
||||||
|
|
||||||
#SYSTEMD_PACKAGES = "${PN}-systemd"
|
|
||||||
#SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
|
|
||||||
|
|
||||||
SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
|
SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
|
||||||
file://tickadj.c.patch \
|
file://tickadj.c.patch \
|
||||||
|
@ -29,21 +24,32 @@ do_install_append() {
|
||||||
install -d ${D}/${sysconfdir}/network/if-up.d
|
install -d ${D}/${sysconfdir}/network/if-up.d
|
||||||
install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
|
install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
|
||||||
|
|
||||||
#install -d ${D}${systemd_unitdir}/system
|
install -d ${D}${systemd_unitdir}/system
|
||||||
#install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
|
install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
|
||||||
#install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
|
install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
|
||||||
|
|
||||||
|
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
||||||
|
ln -sf ../ntpd.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
||||||
}
|
}
|
||||||
|
|
||||||
#PACKAGES =+ "${PN}-systemd"
|
FILES_${PN}-bin = "${bindir}/ntp-wait \
|
||||||
|
${bindir}/ntpdc \
|
||||||
|
${bindir}/ntpq \
|
||||||
|
${bindir}/ntptime \
|
||||||
|
${bindir}/ntptrace"
|
||||||
|
|
||||||
#FILES_${PN}-systemd = "${systemd_unitdir}/system/"
|
FILES_${PN} = "${bindir}/ntpd \
|
||||||
#RDEPENDS_${PN}-systemd = "${PN}"
|
${sysconfdir}/ntp.conf \
|
||||||
|
${sysconfdir}/init.d/ntpd \
|
||||||
|
${systemd_unitdir}/system/ntpd.service \
|
||||||
|
${systemd_unitdir}/system/multi-user.target.wants/ntpd.service"
|
||||||
|
|
||||||
FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
|
|
||||||
FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
|
|
||||||
FILES_${PN}-tickadj = "${bindir}/tickadj"
|
FILES_${PN}-tickadj = "${bindir}/tickadj"
|
||||||
FILES_ntp-utils = "${bindir}/*"
|
FILES_ntp-utils = "${bindir}/*"
|
||||||
FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate"
|
FILES_ntpdate = "${bindir}/ntpdate \
|
||||||
|
${sysconfdir}/network/if-up.d/ntpdate \
|
||||||
|
${systemd_unitdir}/system/ntpdate.service \
|
||||||
|
${systemd_unitdir}/system/multi-user.target.wants/ntpdate.service"
|
||||||
|
|
||||||
# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
|
# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms
|
||||||
# with wonky clocks (e.g. OpenSlug)
|
# with wonky clocks (e.g. OpenSlug)
|
||||||
|
@ -60,4 +66,3 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue