From 7a3480c41a26fa894ec6774179c6376c41fb09a585929cd69134dc9b9516cbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rusmir=20Du=C5=A1ko?= Date: Mon, 13 Jul 2015 13:59:41 +0000 Subject: [PATCH] Accepting request 316447 from home:jkeil:branches:network - Add ppp@.service unit file for systemd * start/stops a configured connection over ppp (e.g. ppp@PROVIDER) OBS-URL: https://build.opensuse.org/request/show/316447 OBS-URL: https://build.opensuse.org/package/show/network/ppp?expand=0&rev=30 --- ppp.changes | 6 ++++++ ppp.spec | 18 +++++++++++++++++- ppp@.service | 9 +++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 ppp@.service diff --git a/ppp.changes b/ppp.changes index 768e4b1..9a88002 100644 --- a/ppp.changes +++ b/ppp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 13 13:21:36 UTC 2015 - jkeil@suse.de + +- Add ppp@.service unit file for systemd + * start/stops a configured connection over ppp (e.g. ppp@PROVIDER) + ------------------------------------------------------------------- Wed Nov 19 03:11:00 UTC 2014 - Led diff --git a/ppp.spec b/ppp.spec index 80ae168..5a33abb 100644 --- a/ppp.spec +++ b/ppp.spec @@ -1,7 +1,7 @@ # # spec file for package ppp # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,6 +43,7 @@ Source10: pppoatm-peers Source11: ppp-peers Source12: pptp-peers Source13: pppoe-discovery.8.gz +Source14: ppp@.service # Makefile changes Patch0: ppp-2.4.6-make.diff # replacedefaultroute option @@ -138,6 +139,20 @@ install -m 644 %{S:12} %{buildroot}%{_sysconfdir}/ppp/peers/pptp install -d 755 %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{S:1} %{buildroot}%{_sysconfdir}/pam.d/ppp install -m 644 %{S:13} %{buildroot}%{_mandir}/man8/pppoe-discovery.8.gz +install -d -m 755 %{buildroot}%{_unitdir} +install -m 644 %{S:14} %{buildroot}%{_unitdir}/ppp@.service + +%pre +%service_add_pre ppp@.service + +%post +%service_add_post ppp@.service + +%preun +%service_del_preun ppp@.service + +%postun +%service_del_postun ppp@.service %files %defattr (-, root, root) @@ -155,6 +170,7 @@ install -m 644 %{S:13} %{buildroot}%{_mandir}/man8/pppoe-discovery.8.gz %{_sbindir}/pppdump %{_sbindir}/pppstats %{_sbindir}/pppoe-discovery +%{_unitdir}/ppp@.service %dir %{_libdir}/pppd %dir %{_libdir}/pppd/%{version} %attr(0755,root,root) %{_libdir}/pppd/%{version}/*.so diff --git a/ppp@.service b/ppp@.service new file mode 100644 index 0000000..6acc2bf --- /dev/null +++ b/ppp@.service @@ -0,0 +1,9 @@ +[Unit] +Description=PPP link to %I +Before=network.target + +[Service] +ExecStart=/usr/sbin/pppd call %I nodetach nolog + +[Install] +WantedBy=multi-user.target