summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-13 13:45:37 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-15 16:22:03 +0200
commit4188d725513fb660348df16c290618dd0e6198ba (patch)
treeec2b40788f77222c04eb1124afcccb6af74a5ee3 /meta-networking
parent9858cfdb4868ba7ed90d8e46784b7723c30e12c1 (diff)
downloadmeta-openembedded-4188d725513fb660348df16c290618dd0e6198ba.tar.gz
ntp: move systemd support from meta-systemd back to meta-networking
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/ntp/ntp.inc29
-rw-r--r--meta-networking/recipes-support/ntp/ntp/ntpd.service11
-rw-r--r--meta-networking/recipes-support/ntp/ntp/ntpdate.service11
-rw-r--r--meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb1
4 files changed, 48 insertions, 4 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index d93f22d47..3f53fffa3 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -8,7 +8,7 @@ SECTION = "console/network"
8LICENSE = "NTP" 8LICENSE = "NTP"
9LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" 9LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670"
10 10
11INC_PR = "r3" 11INC_PR = "r6"
12 12
13SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ 13SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \
14 file://tickadj.c.patch \ 14 file://tickadj.c.patch \
@@ -18,9 +18,11 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g
18 file://ntp.conf \ 18 file://ntp.conf \
19 file://ntpdate \ 19 file://ntpdate \
20 file://ntpdate.default \ 20 file://ntpdate.default \
21 file://ntpdate.service \
22 file://ntpd.service \
21 " 23 "
22 24
23inherit autotools update-rc.d 25inherit autotools update-rc.d systemd
24 26
25# The ac_cv_header_readline_history is to stop ntpdc depending on either 27# The ac_cv_header_readline_history is to stop ntpdc depending on either
26# readline or curses 28# readline or curses
@@ -52,6 +54,10 @@ do_install_append() {
52 install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate 54 install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
53 install -d ${D}/${sysconfdir}/network/if-up.d 55 install -d ${D}/${sysconfdir}/network/if-up.d
54 ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d 56 ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
57
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
60 install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
55} 61}
56 62
57PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils" 63PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils"
@@ -65,12 +71,29 @@ RPROVIDES_${PN}-utils = "${PN}-bin"
65RREPLACES_${PN}-utils = "${PN}-bin" 71RREPLACES_${PN}-utils = "${PN}-bin"
66RCONFLICTS_${PN}-utils = "${PN}-bin" 72RCONFLICTS_${PN}-utils = "${PN}-bin"
67 73
74SYSTEMD_PACKAGES = "${PN} ntpdate"
75SYSTEMD_SERVICE_${PN} = "ntpd.service"
76SYSTEMD_SERVICE_ntpdate = "ntpdate.service"
77
78RPROVIDES_${PN} += "${PN}-systemd"
79RREPLACES_${PN} += "${PN}-systemd"
80RCONFLICTS_${PN} += "${PN}-systemd"
81
82RPROVIDES_ntpdate += "ntpdate-systemd"
83RREPLACES_ntpdate += "ntpdate-systemd"
84RCONFLICTS_ntpdate += "ntpdate-systemd"
85
68RSUGGESTS_${PN} = "iana-etc" 86RSUGGESTS_${PN} = "iana-etc"
69 87
70FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}" 88FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}"
71FILES_${PN}-tickadj = "${bindir}/tickadj" 89FILES_${PN}-tickadj = "${bindir}/tickadj"
72FILES_${PN}-utils = "${bindir}" 90FILES_${PN}-utils = "${bindir}"
73FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate-sync ${bindir}/ntpdate-sync ${sysconfdir}/default/ntpdate" 91FILES_ntpdate = "${bindir}/ntpdate \
92 ${sysconfdir}/network/if-up.d/ntpdate-sync \
93 ${bindir}/ntpdate-sync \
94 ${sysconfdir}/default/ntpdate \
95 ${systemd_unitdir}/system/ntpdate.service \
96"
74 97
75CONFFILES_${PN} = "${sysconfdir}/ntp.conf" 98CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
76CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate" 99CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate"
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-networking/recipes-support/ntp/ntp/ntpd.service
new file mode 100644
index 000000000..bd87b1ea2
--- /dev/null
+++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Network Time Service
3After=network.target
4
5[Service]
6Type=forking
7PIDFile=/run/ntpd.pid
8ExecStart=/usr/bin/ntpd -p /run/ntpd.pid
9
10[Install]
11WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpdate.service b/meta-networking/recipes-support/ntp/ntp/ntpdate.service
new file mode 100644
index 000000000..10cbd70f9
--- /dev/null
+++ b/meta-networking/recipes-support/ntp/ntp/ntpdate.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Network Time Service (one-shot ntpdate mode)
3Before=ntpd.service
4
5[Service]
6Type=oneshot
7ExecStart=/usr/bin/ntpdate-sync silent
8RemainAfterExit=yes
9
10[Install]
11WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb
index f1e9ecd7a..588a1b03c 100644
--- a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb
+++ b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb
@@ -4,4 +4,3 @@ PR = "${INC_PR}.0"
4 4
5SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc" 5SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc"
6SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c" 6SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c"
7