diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-08 14:11:21 +0100 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-08 14:47:40 +0100 |
commit | dd7c7f11049ecc4eb6cf898059d2dca2766c8408 (patch) | |
tree | 8edc4a47ce14641c89e2af104fe490b01a526ccf /meta-oe/recipes-support | |
parent | 932a7a618904d1ffca864c59335c173d0852a69e (diff) | |
download | meta-openembedded-dd7c7f11049ecc4eb6cf898059d2dca2766c8408.tar.gz |
ntp 4.2.6p3: add native systemd support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/ntp/files/ntpd.service | 12 | ||||
-rw-r--r-- | meta-oe/recipes-support/ntp/ntp.inc | 4 | ||||
-rw-r--r-- | meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | 29 |
3 files changed, 37 insertions, 8 deletions
diff --git a/meta-oe/recipes-support/ntp/files/ntpd.service b/meta-oe/recipes-support/ntp/files/ntpd.service new file mode 100644 index 000000000..420a0563a --- /dev/null +++ b/meta-oe/recipes-support/ntp/files/ntpd.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Network Time Service | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/run/ntpd.pid | ||
8 | EnvironmentFile=/etc/ntp.conf | ||
9 | ExecStart=/usr/bin/ntpd $NTPD_ARGS -p /run/ntpd.pid | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||
diff --git a/meta-oe/recipes-support/ntp/ntp.inc b/meta-oe/recipes-support/ntp/ntp.inc index 3dc7bdf43..b398b801e 100644 --- a/meta-oe/recipes-support/ntp/ntp.inc +++ b/meta-oe/recipes-support/ntp/ntp.inc | |||
@@ -12,7 +12,9 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ | |||
12 | file://ipv6only-workaround.patch \ | 12 | file://ipv6only-workaround.patch \ |
13 | file://ntpd \ | 13 | file://ntpd \ |
14 | file://ntp.conf \ | 14 | file://ntp.conf \ |
15 | file://ntpdate" | 15 | file://ntpdate \ |
16 | file://ntpd.service \ | ||
17 | " | ||
16 | 18 | ||
17 | inherit autotools update-rc.d | 19 | inherit autotools update-rc.d |
18 | 20 | ||
diff --git a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb index 590eed15a..e2bb1a806 100644 --- a/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb +++ b/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | |||
@@ -1,13 +1,20 @@ | |||
1 | require ntp.inc | 1 | require ntp.inc |
2 | 2 | ||
3 | PR = "r2" | 3 | PR = "r3" |
4 | |||
5 | inherit systemd | ||
6 | |||
7 | SYSTEMD_PACKAGES = "${PN}-systemd" | ||
8 | SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service" | ||
4 | 9 | ||
5 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ | 10 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ |
6 | file://tickadj.c.patch \ | 11 | file://tickadj.c.patch \ |
7 | file://ntp-4.2.4_p6-nano.patch \ | 12 | file://ntp-4.2.4_p6-nano.patch \ |
8 | file://ntpd \ | 13 | file://ntpd \ |
9 | file://ntp.conf \ | 14 | file://ntp.conf \ |
10 | file://ntpdate" | 15 | file://ntpdate \ |
16 | file://ntpd.service \ | ||
17 | " | ||
11 | 18 | ||
12 | SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2" | 19 | SRC_URI[md5sum] = "59876a9009b098ff59767ee45a88ebd2" |
13 | SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e" | 20 | SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85a7c40e" |
@@ -15,13 +22,21 @@ SRC_URI[sha256sum] = "6e84d4ddfa14b911c3ed88463af10867e1fa9b287e7b34d8a02e78be85 | |||
15 | EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd" | 22 | EXTRA_OECONF += " --with-net-snmp-config=no --without-ntpsnmpd" |
16 | 23 | ||
17 | do_install_append() { | 24 | do_install_append() { |
18 | install -d ${D}/${sysconfdir}/init.d | 25 | install -d ${D}/${sysconfdir}/init.d |
19 | install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} | 26 | install -m 644 ${WORKDIR}/ntp.conf ${D}/${sysconfdir} |
20 | install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d | 27 | install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d |
21 | install -d ${D}/${sysconfdir}/network/if-up.d | 28 | install -d ${D}/${sysconfdir}/network/if-up.d |
22 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d | 29 | install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d |
30 | |||
31 | install -d ${D}${base_libdir}/systemd/system | ||
32 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/ | ||
23 | } | 33 | } |
24 | 34 | ||
35 | PACKAGES =+ "${PN}-systemd" | ||
36 | |||
37 | FILES_${PN}-systemd = "${base_libdir}/systemd/system/" | ||
38 | RDEPENDS_${PN}-systemd = "${PN}" | ||
39 | |||
25 | FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" | 40 | FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" |
26 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" | 41 | FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" |
27 | FILES_${PN}-tickadj = "${bindir}/tickadj" | 42 | FILES_${PN}-tickadj = "${bindir}/tickadj" |