[Lunar-commits] <moonbase-other> ppp: add a systemd service script if systemd is installed.

Florin Braescu florin at lunar-linux.org
Mon Jun 24 15:07:29 CEST 2013


commit 80e395d55012e4c18511f2837aa2a395a16a5e1f
Author: Florin Braescu <florin at lunar-linux.org>
Date: Mon, 24 Jun 2013 06:06:44 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/80e395d55012e4c18511f2837aa2a395a16a5e1f

ppp: add a systemd service script if systemd is installed.
---
  net/ppp/BUILD                | +5/-1     
  net/ppp/system.d/ppp.service | +9/-0     
  2 files changed, 14 insertions(+), 1 deletion(-)

--- a/net/ppp/BUILD
+++ b/net/ppp/BUILD
@@ -20,11 +20,15 @@
     fi  &&
 
   if  [  !  -e  /etc/ppp/chat/isp  ];  then
-          install -m644  $SCRIPT_DIRECTORY/isp  /etc/ppp/chat/isp
+    install -m644  $SCRIPT_DIRECTORY/isp  /etc/ppp/chat/isp
   fi  &&
 
   chown -R root:ppp /usr/sbin/pppd /etc/ppp  &&
   chmod 4750 /usr/sbin/pppd  &&
   chmod 600 /etc/ppp/*-secrets
 
+  if module_installed systemd; then
+    install -D -m644 $SCRIPT_DIRECTORY/system.d/ppp.service /usr/lib/systemd/system/ppp at .service
+  fi
+
 ) > $C_FIFO 2>&1
--- /dev/null
+++ b/net/ppp/system.d/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




More information about the Lunar-commits mailing list