summaryrefslogtreecommitdiff
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-04-23 17:40:52 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-24 17:54:57 +0100
commite84f7ea24b08e3127b70731908b819fbdc1cbfd5 (patch)
treec7d3e6f3c92be3c9e0ad8e194d6b266f09801485 /meta/recipes-connectivity
parent812f69fee5fceef853c42960f3d90491bda8378a (diff)
downloadopenembedded-core-e84f7ea24b08e3127b70731908b819fbdc1cbfd5.tar.gz
openembedded-core-e84f7ea24b08e3127b70731908b819fbdc1cbfd5.tar.bz2
openembedded-core-e84f7ea24b08e3127b70731908b819fbdc1cbfd5.zip
ppp: add systemd support
Add systemd support for ppp. The unit file mostly comes from ArchLinux. 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@.service9
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.6.bb9
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 @@
+[Unit]
+Description=PPP link to %I
+Before=network.target
+
+[Service]
+ExecStart=@SBINDIR@/pppd call %I nodetach nolog
+
+[Install]
+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 \
file://ppp_on_boot \
file://provider \
file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
+ file://ppp@.service \
"
SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b"
SRC_URI[sha256sum] = "1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d"
-inherit autotools-brokensep
+inherit autotools-brokensep systemd
TARGET_CC_ARCH += " ${LDFLAGS}"
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 () {
install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts
install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot
install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/ppp@.service
rm -rf ${D}/${mandir}/man8/man8
chmod u+s ${D}${sbindir}/pppd
}
CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
-FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd"
+FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_unitdir}/system/ppp@.service"
FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug"
FILES_${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so"
FILES_${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so"