diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-07-11 13:47:00 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-07-16 09:39:06 +0200 |
commit | 2dae284c9e4fc4be7dbe846f984ee7cf647c7faf (patch) | |
tree | b5158fad04acb4c0663ef29f8fb5de8d34b759a6 /meta-systemd/meta-oe | |
parent | 326e027816d7af4d4896e9e6d74842aa327352e0 (diff) | |
download | meta-openembedded-2dae284c9e4fc4be7dbe846f984ee7cf647c7faf.tar.gz |
ntp: move systemd support to meta-systemd
Diffstat (limited to 'meta-systemd/meta-oe')
3 files changed, 42 insertions, 0 deletions
diff --git a/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpd.service b/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpd.service new file mode 100644 index 0000000000..bd87b1ea24 --- /dev/null +++ b/meta-systemd/meta-oe/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-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service b/meta-systemd/meta-oe/recipes-support/ntp/ntp/ntpdate.service new file mode 100644 index 0000000000..b2bc632069 --- /dev/null +++ b/meta-systemd/meta-oe/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/ntpd -q -g -x | ||
8 | RemainAfterExit=yes | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend b/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend new file mode 100644 index 0000000000..c6cd03147f --- /dev/null +++ b/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend | |||
@@ -0,0 +1,20 @@ | |||
1 | inherit systemd | ||
2 | |||
3 | PRINC := "${@int(PRINC) + 1}" | ||
4 | |||
5 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
6 | |||
7 | SYSTEMD_PACKAGES = "${PN}-systemd ntpdate-systemd" | ||
8 | SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service" | ||
9 | SYSTEMD_SERVICE_ntpdate-systemd = "ntpdate.service" | ||
10 | |||
11 | SRC_URI += " \ | ||
12 | file://ntpdate.service \ | ||
13 | file://ntpd.service \ | ||
14 | " | ||
15 | |||
16 | do_install_append() { | ||
17 | install -d ${D}${systemd_unitdir}/system | ||
18 | install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ | ||
19 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ | ||
20 | } | ||