diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-04-23 17:40:52 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-24 17:55:15 +0100 |
commit | 870a3169d62e3b72d4baf3923b94b56c3deb71ae (patch) | |
tree | eb13c6c742c0d82bc550979af5e7ca1d756442ab /meta/recipes-connectivity | |
parent | b45533c1c05986b01ea59ea7fb35501436117337 (diff) | |
download | poky-870a3169d62e3b72d4baf3923b94b56c3deb71ae.tar.gz |
ppp: add systemd support
Add systemd support for ppp.
The unit file mostly comes from ArchLinux.
(From OE-Core rev: e84f7ea24b08e3127b70731908b819fbdc1cbfd5)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/ppp@.service | 9 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp_2.4.6.bb | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/ppp@.service b/meta/recipes-connectivity/ppp/ppp/ppp@.service new file mode 100644 index 0000000000..2bf0b5e347 --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/ppp@.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=PPP link to %I | ||
3 | Before=network.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=@SBINDIR@/pppd call %I nodetach nolog | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb b/meta/recipes-connectivity/ppp/ppp_2.4.6.bb index b98abecd3a..8bc3672600 100644 --- a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb +++ b/meta/recipes-connectivity/ppp/ppp_2.4.6.bb | |||
@@ -28,12 +28,13 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \ | |||
28 | file://ppp_on_boot \ | 28 | file://ppp_on_boot \ |
29 | file://provider \ | 29 | file://provider \ |
30 | file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \ | 30 | file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \ |
31 | file://ppp@.service \ | ||
31 | " | 32 | " |
32 | 33 | ||
33 | SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b" | 34 | SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b" |
34 | SRC_URI[sha256sum] = "1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d" | 35 | SRC_URI[sha256sum] = "1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d" |
35 | 36 | ||
36 | inherit autotools-brokensep | 37 | inherit autotools-brokensep systemd |
37 | 38 | ||
38 | TARGET_CC_ARCH += " ${LDFLAGS}" | 39 | TARGET_CC_ARCH += " ${LDFLAGS}" |
39 | EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}" | 40 | EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}" |
@@ -61,13 +62,17 @@ do_install_append () { | |||
61 | install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts | 62 | install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts |
62 | install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot | 63 | install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot |
63 | install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider | 64 | install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider |
65 | install -d ${D}${systemd_unitdir}/system | ||
66 | install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_unitdir}/system | ||
67 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
68 | ${D}${systemd_unitdir}/system/ppp@.service | ||
64 | rm -rf ${D}/${mandir}/man8/man8 | 69 | rm -rf ${D}/${mandir}/man8/man8 |
65 | chmod u+s ${D}${sbindir}/pppd | 70 | chmod u+s ${D}${sbindir}/pppd |
66 | } | 71 | } |
67 | 72 | ||
68 | CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options" | 73 | CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options" |
69 | PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools" | 74 | PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools" |
70 | FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd" | 75 | FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_unitdir}/system/ppp@.service" |
71 | FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug" | 76 | FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug" |
72 | FILES_${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so" | 77 | FILES_${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so" |
73 | FILES_${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so" | 78 | FILES_${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so" |