mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-08 05:29:22 +00:00
ntp 4.2.6p3: add native systemd support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Network Time Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/run/ntpd.pid
|
||||||
|
EnvironmentFile=/etc/ntp.conf
|
||||||
|
ExecStart=/usr/bin/ntpd $NTPD_ARGS -p /run/ntpd.pid
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -12,7 +12,9 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \
|
|||||||
file://ipv6only-workaround.patch \
|
file://ipv6only-workaround.patch \
|
||||||
file://ntpd \
|
file://ntpd \
|
||||||
file://ntp.conf \
|
file://ntp.conf \
|
||||||
file://ntpdate"
|
file://ntpdate \
|
||||||
|
file://ntpd.service \
|
||||||
|
"
|
||||||
|
|
||||||
inherit autotools update-rc.d
|
inherit autotools update-rc.d
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
require ntp.inc
|
require ntp.inc
|
||||||
|
|
||||||
PR = "r2"
|
PR = "r3"
|
||||||
|
|
||||||
|
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 \
|
||||||
file://ntp-4.2.4_p6-nano.patch \
|
file://ntp-4.2.4_p6-nano.patch \
|
||||||
file://ntpd \
|
file://ntpd \
|
||||||
file://ntp.conf \
|
file://ntp.conf \
|
||||||
file://ntpdate"
|
file://ntpdate \
|
||||||
|
file://ntpd.service \
|
||||||
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
|
SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2"
|
||||||
SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e"
|
SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e"
|
||||||
@@ -15,13 +22,21 @@ SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85
|
|||||||
EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd"
|
EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd"
|
||||||
|
|
||||||
do_install_append() {
|
do_install_append() {
|
||||||
install -d ${D}/${sysconfdir}/init.d
|
install -d ${D}/${sysconfdir}/init.d
|
||||||
install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
|
install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir}
|
||||||
install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
|
install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d
|
||||||
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}${base_libdir}/systemd/system
|
||||||
|
install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PACKAGES =+ "${PN}-systemd"
|
||||||
|
|
||||||
|
FILES_${PN}-systemd = "${base_libdir}/systemd/system/"
|
||||||
|
RDEPENDS_${PN}-systemd = "${PN}"
|
||||||
|
|
||||||
FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
|
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} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd"
|
||||||
FILES_${PN}-tickadj = "${bindir}/tickadj"
|
FILES_${PN}-tickadj = "${bindir}/tickadj"
|
||||||
|
|||||||
Reference in New Issue
Block a user