diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-13 13:45:37 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-15 16:22:03 +0200 |
| commit | 4188d725513fb660348df16c290618dd0e6198ba (patch) | |
| tree | ec2b40788f77222c04eb1124afcccb6af74a5ee3 /meta-networking | |
| parent | 9858cfdb4868ba7ed90d8e46784b7723c30e12c1 (diff) | |
| download | meta-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.inc | 29 | ||||
| -rw-r--r-- | meta-networking/recipes-support/ntp/ntp/ntpd.service | 11 | ||||
| -rw-r--r-- | meta-networking/recipes-support/ntp/ntp/ntpdate.service | 11 | ||||
| -rw-r--r-- | meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb | 1 |
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 d93f22d473..3f53fffa3e 100644 --- a/meta-networking/recipes-support/ntp/ntp.inc +++ b/meta-networking/recipes-support/ntp/ntp.inc | |||
| @@ -8,7 +8,7 @@ SECTION = "console/network" | |||
| 8 | LICENSE = "NTP" | 8 | LICENSE = "NTP" |
| 9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" | 9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" |
| 10 | 10 | ||
| 11 | INC_PR = "r3" | 11 | INC_PR = "r6" |
| 12 | 12 | ||
| 13 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ | 13 | SRC_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 | ||
| 23 | inherit autotools update-rc.d | 25 | inherit 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 | ||
| 57 | PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils" | 63 | PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils" |
| @@ -65,12 +71,29 @@ RPROVIDES_${PN}-utils = "${PN}-bin" | |||
| 65 | RREPLACES_${PN}-utils = "${PN}-bin" | 71 | RREPLACES_${PN}-utils = "${PN}-bin" |
| 66 | RCONFLICTS_${PN}-utils = "${PN}-bin" | 72 | RCONFLICTS_${PN}-utils = "${PN}-bin" |
| 67 | 73 | ||
| 74 | SYSTEMD_PACKAGES = "${PN} ntpdate" | ||
| 75 | SYSTEMD_SERVICE_${PN} = "ntpd.service" | ||
| 76 | SYSTEMD_SERVICE_ntpdate = "ntpdate.service" | ||
| 77 | |||
| 78 | RPROVIDES_${PN} += "${PN}-systemd" | ||
| 79 | RREPLACES_${PN} += "${PN}-systemd" | ||
| 80 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
| 81 | |||
| 82 | RPROVIDES_ntpdate += "ntpdate-systemd" | ||
| 83 | RREPLACES_ntpdate += "ntpdate-systemd" | ||
| 84 | RCONFLICTS_ntpdate += "ntpdate-systemd" | ||
| 85 | |||
| 68 | RSUGGESTS_${PN} = "iana-etc" | 86 | RSUGGESTS_${PN} = "iana-etc" |
| 69 | 87 | ||
| 70 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}" | 88 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}" |
| 71 | FILES_${PN}-tickadj = "${bindir}/tickadj" | 89 | FILES_${PN}-tickadj = "${bindir}/tickadj" |
| 72 | FILES_${PN}-utils = "${bindir}" | 90 | FILES_${PN}-utils = "${bindir}" |
| 73 | FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate-sync ${bindir}/ntpdate-sync ${sysconfdir}/default/ntpdate" | 91 | FILES_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 | ||
| 75 | CONFFILES_${PN} = "${sysconfdir}/ntp.conf" | 98 | CONFFILES_${PN} = "${sysconfdir}/ntp.conf" |
| 76 | CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate" | 99 | CONFFILES_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 0000000000..bd87b1ea24 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Network Time Service | ||
| 3 | After=network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=forking | ||
| 7 | PIDFile=/run/ntpd.pid | ||
| 8 | ExecStart=/usr/bin/ntpd -p /run/ntpd.pid | ||
| 9 | |||
| 10 | [Install] | ||
| 11 | WantedBy=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 0000000000..10cbd70f99 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/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/ntpdate-sync silent | ||
| 8 | RemainAfterExit=yes | ||
| 9 | |||
| 10 | [Install] | ||
| 11 | WantedBy=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 f1e9ecd7a8..588a1b03c9 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 | ||
| 5 | SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc" | 5 | SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc" |
| 6 | SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c" | 6 | SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c" |
| 7 | |||
