]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
ppp: Add systemd unit files.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Jun 2012 11:26:42 +0000 (11:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Jun 2012 11:26:42 +0000 (11:26 +0000)
ppp/ppp.nm
ppp/systemd/pppd@.service [new file with mode: 0644]

index f82be752cbeb001ff02e9b9cf618cdbc67ad5bae..8a0ab3f6336deb8f2fb47375b37ecf8521c7b560 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = ppp
 version    = 2.4.5
-release    = 3
+release    = 4
 
 groups     = System/Daemons
 url        = ftp://ftp.samba.org/pub/ppp/
@@ -34,7 +34,7 @@ build
        CFLAGS += -fPIC
 
        prepare_cmds
-               sed -e "s@^RUNDIR .*@RUNDIR = /var/run/ppp@" \
+               sed -e "s@^RUNDIR .*@RUNDIR = /run/ppp@" \
                        -e "s@^LOGDIR .*@LOGDIR = /var/log/ppp@" \
                        -i linux/Makefile.top
 
diff --git a/ppp/systemd/pppd@.service b/ppp/systemd/pppd@.service
new file mode 100644 (file)
index 0000000..a99c7cc
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Point-to-Point protocol daemon on %I
+BindTo=dev-%I.device
+After=dev-%I.device
+
+[Service]
+Type=forking
+ExecStartPre=/usr/lib/network/helpers/pppd-config-helper create %I
+ExecStart=/usr/sbin/pppd file /run/network/ppp/%I/pppd.conf
+ExecStopPost=/usr/lib/network/helpers/pppd-config-helper remove %I
+PIDFile=/run/ppp-%I.pid
+Restart=failure
+UtmpIdentifier=%I
+KillMode=process