mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 16:27:27 +00:00
meta-systemd: Move ntp recipes to 'meta-networking' sublayer
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Eric Bénard <eric@eukrea.com>
This commit is contained in:
committed by
Eric Bénard
parent
216a09ca38
commit
6d6dae7d14
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Network Time Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/ntpd.pid
|
||||
ExecStart=/usr/bin/ntpd -p /run/ntpd.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Network Time Service (one-shot ntpdate mode)
|
||||
Before=ntpd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/ntpd -q -g -x
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
inherit systemd
|
||||
|
||||
PRINC := "${@int(PRINC) + 1}"
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-systemd ntpdate-systemd"
|
||||
SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
|
||||
SYSTEMD_SERVICE_ntpdate-systemd = "ntpdate.service"
|
||||
|
||||
SRC_URI += " \
|
||||
file://ntpdate.service \
|
||||
file://ntpd.service \
|
||||
"
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
|
||||
install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
|
||||
}
|
||||
Reference in New Issue
Block a user