summaryrefslogtreecommitdiffstats
path: root/abs/core/ppp
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-10-27 20:28:27 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-10-27 20:28:27 (GMT)
commitf7b823f55a80b1498c30e9f3a47692a2329c4f09 (patch)
tree6de557714e6336282fbc0ab16c6578386dfc6654 /abs/core/ppp
parent4c2a2e3504f472628285a989c7c9a76be6855f54 (diff)
parent01c1a60f3b7f93b3ed7404196c2cf798c4d8c674 (diff)
downloadlinhes_pkgbuild-f7b823f55a80b1498c30e9f3a47692a2329c4f09.zip
linhes_pkgbuild-f7b823f55a80b1498c30e9f3a47692a2329c4f09.tar.gz
linhes_pkgbuild-f7b823f55a80b1498c30e9f3a47692a2329c4f09.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/core/ppp')
-rw-r--r--abs/core/ppp/PKGBUILD87
-rw-r--r--abs/core/ppp/ip-down2
-rw-r--r--abs/core/ppp/ip-down.d.dns.sh6
-rw-r--r--abs/core/ppp/ip-up.d.dns.sh10
-rw-r--r--abs/core/ppp/ipv6-down12
-rw-r--r--abs/core/ppp/ipv6-up12
-rw-r--r--abs/core/ppp/ipv6-up.d.iface-config.sh4
-rw-r--r--abs/core/ppp/plog7
-rw-r--r--abs/core/ppp/poff103
-rw-r--r--abs/core/ppp/pon32
-rw-r--r--abs/core/ppp/pon.1121
-rw-r--r--abs/core/ppp/ppp36
-rw-r--r--abs/core/ppp/ppp-2.4.6-makefiles.patch270
-rw-r--r--abs/core/ppp/ppp.systemd9
14 files changed, 365 insertions, 346 deletions
diff --git a/abs/core/ppp/PKGBUILD b/abs/core/ppp/PKGBUILD
index 33c7ecc..e7b4a00 100644
--- a/abs/core/ppp/PKGBUILD
+++ b/abs/core/ppp/PKGBUILD
@@ -1,66 +1,62 @@
-# $Id: PKGBUILD 142987 2011-11-19 20:10:23Z thomas $
+# $Id$
# Maintainer: Thomas Baechler <thomas@archlinux.org>
pkgname=ppp
-pkgver=2.4.5
-pkgrel=3
+pkgver=2.4.6
+pkgrel=2
pkgdesc="A daemon which implements the Point-to-Point Protocol for dial-up networking"
arch=(i686 x86_64)
url="http://www.samba.org/ppp/"
license=('custom:GPL/BSD')
-groups=('base')
depends=('glibc' 'libpcap>=1.0.0')
-backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down})
-source=(ftp://ftp.samba.org/pub/ppp/ppp-${pkgver}.tar.gz
+backup=(etc/ppp/{chap-secrets,pap-secrets,options,ip-up,ip-down,ip-down.d/00-dns.sh,ip-up.d/00-dns.sh,ipv6-up.d/00-iface-config.sh})
+source=(ftp://ftp.samba.org/pub/ppp/ppp-${pkgver}.tar.gz{,.asc}
+ ppp-2.4.6-makefiles.patch
options
- pon
- poff
- ppp
- plog
- pon.1
ip-up
ip-down
ip-up.d.dns.sh
- ip-down.d.dns.sh)
-md5sums=('4621bc56167b6953ec4071043fe0ec57'
- '7a9259a8f038073eeea7e4552ff1849f'
- '48c024f73a80c8b69c4def22f86902cc'
- '2d811f8470ccdea3b8c4505a438483e9'
- '7561c73b557292d5ba1a9c5dbd270fde'
- '86cdaf133f7a79fb464f02d83afc7734'
- '44cc662ba9aa61dd9add3ddd4c5ded57'
- 'e4beb16ed600b61336d50b2bd2df7cd5'
- '2fa0671f40711e69194ccf60979f8b33'
- '4a074d74c29625b254a1db720cb87b99'
- '8d1be5af8e46393ba6eb273377831e38')
+ ip-down.d.dns.sh
+ ipv6-up
+ ipv6-down
+ ipv6-up.d.iface-config.sh
+ ppp.systemd)
+sha256sums=('1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d'
+ 'SKIP'
+ 'f04f47318226c79594f45b8b75877c30710d22fe0fb1e2e17db3b4257dc4218c'
+ '0933fecb9e0adaddd88ee1e049a5f3a0508e83b81dc1aa333df784e729ab4b6e'
+ 'ddef42b2cc5d49e81556dc9dbacf5ee3bf8dc32704f3670c2233eed42c4a4efd'
+ '658630ba4c5cb583df80af6d4df81df8ae20798f63cc4b9cec8d4dad13a6a897'
+ 'aafb75b978aa13225444dc6b914fab324d686821be93c49e893800e647aa7648'
+ '17b486fa69a71dafcbe543dc4f2b8cb9ed31e675aabc5f6c98ef94dbc1561c85'
+ 'bb3f44a4f2c4b8dbe7f84d77feae90a71caa9fa3c252a20c390e015d4f8ea248'
+ '77292b79f99f97a01aa9a75cd7cd93da70d746d3b8cc60f35b31dfe0568544c0'
+ '20780cf4bd0774bebb55ecb3bdae7667c9ae5cbe003a52a1ecb0bbc77d46260f'
+ 'eb8ab2e2d71c3bb9c4297cf847b6e9d52616a3fdbf2257c479cc43dff318c831')
-build() {
+prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
- # fix CFLAGS
- # -D_GNU_SOURCE is needed for IPv6 to work apparently
- export CFLAGS="$CFLAGS -D_GNU_SOURCE"
- sed -i "s:-O2 -pipe -Wall -g:${CFLAGS}:" pppd/Makefile.linux
- sed -i "s:-g -O2:${CFLAGS}:" pppd/plugins/Makefile.linux
- sed -i "s:-O2:${CFLAGS}:" pppstats/Makefile.linux
- sed -i "s:-O2 -g -pipe:${CFLAGS}:" chat/Makefile.linux
- sed -i "s:-O:${CFLAGS}:" pppdump/Makefile.linux
+ patch -p1 -i "${srcdir}/ppp-2.4.6-makefiles.patch"
# enable active filter
sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
# enable ipv6 support
sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
# Enable Microsoft proprietary Callback Control Protocol
sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
- # Fix build error with recent kernels
- rm include/linux/if_pppol2tp.h
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr
+ # -D_GNU_SOURCE is needed for IPv6 to work apparently
+ CFLAGS="$CPPFLAGS $CFLAGS -D_GNU_SOURCE" LDFLAGS="$LDFLAGS" ./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}/usr" install
+ make INSTROOT="${pkgdir}" install
+
install -D -m644 ../options "${pkgdir}/etc/ppp/options"
install -D -m755 ../ip-up "${pkgdir}/etc/ppp/ip-up"
install -D -m755 ../ip-down "${pkgdir}/etc/ppp/ip-down"
@@ -68,13 +64,20 @@ package() {
install -d -m755 "${pkgdir}/etc/ppp/ip-down.d"
install -m755 ../ip-up.d.dns.sh "${pkgdir}/etc/ppp/ip-up.d/00-dns.sh"
install -m755 ../ip-down.d.dns.sh "${pkgdir}/etc/ppp/ip-down.d/00-dns.sh"
- install -D -m755 ../pon "${pkgdir}/usr/bin/pon"
- install -D -m755 ../poff "${pkgdir}/usr/bin/poff"
- install -D -m755 ../plog "${pkgdir}/usr/sbin/plog"
+ install -D -m755 ../ipv6-up "${pkgdir}/etc/ppp/ipv6-up"
+ install -D -m755 ../ipv6-down "${pkgdir}/etc/ppp/ipv6-down"
+ install -d -m755 "${pkgdir}/etc/ppp/ipv6-up.d"
+ install -d -m755 "${pkgdir}/etc/ppp/ipv6-down.d"
+ install -m755 ../ipv6-up.d.iface-config.sh "${pkgdir}/etc/ppp/ipv6-up.d/00-iface-config.sh"
+
+ install -D -m755 scripts/pon "${pkgdir}/usr/bin/pon"
+ install -D -m755 scripts/poff "${pkgdir}/usr/bin/poff"
+ install -D -m755 scripts/plog "${pkgdir}/usr/bin/plog"
+ install -D -m644 scripts/pon.1 "${pkgdir}/usr/share/man/man1/pon.1"
install -D -m600 etc.ppp/pap-secrets "${pkgdir}/etc/ppp/pap-secrets"
install -D -m600 etc.ppp/chap-secrets "${pkgdir}/etc/ppp/chap-secrets"
- install -D -m755 ${srcdir}/ppp "${pkgdir}/etc/rc.d/ppp"
- install -D -m644 ${srcdir}/pon.1 "${pkgdir}/usr/share/man/man1/pon.1"
install -d -m755 "${pkgdir}/etc/ppp/peers"
chmod 0755 "${pkgdir}/usr/lib/pppd/${pkgver}"/*.so
+
+ install -D -m644 "${srcdir}"/ppp.systemd "${pkgdir}"/usr/lib/systemd/system/ppp@.service
}
diff --git a/abs/core/ppp/ip-down b/abs/core/ppp/ip-down
index 301f3ab..cfd3ae0 100644
--- a/abs/core/ppp/ip-down
+++ b/abs/core/ppp/ip-down
@@ -3,7 +3,7 @@
# This script is run by pppd after the connection has ended.
#
-# Execute all scripts in /etc/ppp/ip-up.d/
+# Execute all scripts in /etc/ppp/ip-down.d/
for ipdown in /etc/ppp/ip-down.d/*.sh; do
if [ -x $ipdown ]; then
# Parameters: interface-name tty-device speed local-IP-address remote-IP-address ipparam
diff --git a/abs/core/ppp/ip-down.d.dns.sh b/abs/core/ppp/ip-down.d.dns.sh
index 9e19f7d..c9da47a 100644
--- a/abs/core/ppp/ip-down.d.dns.sh
+++ b/abs/core/ppp/ip-down.d.dns.sh
@@ -1,3 +1,7 @@
#!/bin/sh
-[ -e /etc/resolv.conf.backup.${IFNAME} ] && mv /etc/resolv.conf.backup.${IFNAME} /etc/resolv.conf
+if [ -x /usr/bin/resolvconf ]; then
+ /usr/bin/resolvconf -fd ${IFNAME}
+else
+ [ -e /etc/resolv.conf.backup.${IFNAME} ] && mv /etc/resolv.conf.backup.${IFNAME} /etc/resolv.conf
+fi
diff --git a/abs/core/ppp/ip-up.d.dns.sh b/abs/core/ppp/ip-up.d.dns.sh
index f9df543..0fc737e 100644
--- a/abs/core/ppp/ip-up.d.dns.sh
+++ b/abs/core/ppp/ip-up.d.dns.sh
@@ -1,7 +1,11 @@
#!/bin/sh
if [ "$USEPEERDNS" = "1" -a -f /etc/ppp/resolv.conf ]; then
- [ -e /etc/resolv.conf ] && mv /etc/resolv.conf /etc/resolv.conf.backup.${IFNAME}
- mv /etc/ppp/resolv.conf /etc/resolv.conf
- chmod 644 /etc/resolv.conf
+ if [ -x /usr/bin/resolvconf ]; then
+ /usr/bin/resolvconf -a ${IFNAME} </etc/ppp/resolv.conf
+ else
+ [ -e /etc/resolv.conf ] && mv /etc/resolv.conf /etc/resolv.conf.backup.${IFNAME}
+ mv /etc/ppp/resolv.conf /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
fi
diff --git a/abs/core/ppp/ipv6-down b/abs/core/ppp/ipv6-down
new file mode 100644
index 0000000..d3b9e28
--- /dev/null
+++ b/abs/core/ppp/ipv6-down
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# This script is run by pppd after the connection has ended.
+#
+
+# Execute all scripts in /etc/ppp/ipv6-down.d/
+for ipdown in /etc/ppp/ipv6-down.d/*.sh; do
+ if [ -x $ipdown ]; then
+ # Parameters: interface-name tty-device speed local-link-local-address remote-link-local-address ipparam
+ $ipdown "$@"
+ fi
+done
diff --git a/abs/core/ppp/ipv6-up b/abs/core/ppp/ipv6-up
new file mode 100644
index 0000000..b294aaf
--- /dev/null
+++ b/abs/core/ppp/ipv6-up
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# This script is run by pppd when there's a successful ppp connection.
+#
+
+# Execute all scripts in /etc/ppp/ipv6-up.d/
+for ipup in /etc/ppp/ipv6-up.d/*.sh; do
+ if [ -x $ipup ]; then
+ # Parameters: interface-name tty-device speed local-link-local-address remote-link-local-address ipparam
+ $ipup "$@"
+ fi
+done
diff --git a/abs/core/ppp/ipv6-up.d.iface-config.sh b/abs/core/ppp/ipv6-up.d.iface-config.sh
new file mode 100644
index 0000000..b23d6f6
--- /dev/null
+++ b/abs/core/ppp/ipv6-up.d.iface-config.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo 0 > /proc/sys/net/ipv6/conf/$1/use_tempaddr
+echo 2 > /proc/sys/net/ipv6/conf/$1/accept_ra
diff --git a/abs/core/ppp/plog b/abs/core/ppp/plog
deleted file mode 100644
index 84d2c73..0000000
--- a/abs/core/ppp/plog
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [ -s /var/log/ppp.log ]; then
- exec tail "$@" /var/log/ppp.log
-else
- exec tail "$@" /var/log/syslog | grep ' \(pppd\|chat\)\['
-fi
diff --git a/abs/core/ppp/poff b/abs/core/ppp/poff
deleted file mode 100644
index 8b4dffc..0000000
--- a/abs/core/ppp/poff
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh
-
-# Written by John Hasler <john@dhh.gt.org> and based on work
-# by Phil Hands <phil@hands.com>. Distributed under the GNU GPL
-
-if [ -x /usr/bin/kill ]; then
- KILL="/usr/bin/kill"
-else
- KILL="/bin/kill"
-fi
-SIG=TERM
-DONE="stopped"
-MODE=""
-
-usage ()
-{
- cat <<!EOF!
-usage: $0 [option] [provider]
-options:
- -r Cause pppd to drop the line and redial.
- -d Toggle the state of pppd's debug option.
- -c Cause pppd to renegotiate compression.
- -a Stop all pppd's. 'provider' will be ignored.
- -h Print this help summary and exit.
- -v Print version and exit.
- none Stop pppd.
-
-Options may not be combined.
-
-If 'provider' is omitted pppd will be stopped or signalled if and only if
-there is exactly one running unless the '-a' option was given. If
-'provider' is supplied the pppd controlling the connection to that
-provider will be stopped or signalled.
-!EOF!
-}
-
-# Get option. If there are none replace the "?" that getopts puts in
-# FLAG on error with "null".
-getopts rdcavh FLAG
-if [ "$?" -ne 0 ]; then
- FLAG="null"
-fi
-
-# Check for additional options. Should be none.
-getopts :rdcavh DUMMY
-if [ "$?" -eq 0 ]; then
- echo "$0: Illegal option -- ${OPTARG}."
- exit 1
-fi
-
-case $FLAG in
- "r") SIG=HUP; DONE=signalled; shift ;;
- "d") SIG=USR1; DONE=signalled; shift ;;
- "c") SIG=USR2; DONE=signalled; shift ;;
- "a") MODE="all"; shift ;;
- "v") echo "$0$Revision: 1.1 $_TrickToPrint_RCS_Revision"; exit 0 ;;
- "h") usage; exit 0 ;;
- "?") exit 1;
-esac
-
-# Get the PIDs of all the pppds running. Could also get these from
-# /var/run, but pppd doesn't create .pid files until ppp is up.
-PIDS=`pidof pppd`
-
-# poff is pointless if pppd isn't running.
-if test -z "$PIDS"; then
- echo "$0: No pppd is running. None ${DONE}."
- exit 1
-fi
-
-# Find out how many pppd's are running.
-N=`echo "$PIDS" | wc -w`
-
-# If there are no arguments we can't do anything if there is more than one
-# pppd running.
-if test "$#" -eq 0 -a "$N" -gt 1 -a $FLAG != "a" ; then
- echo "$0: More than one pppd running and no "-a" option and
-no arguments supplied. Nothing ${DONE}."
- exit 1
-fi
-
-# If either there are no arguments or '-a' was specified kill all the
-# pppd's.
-if test "$#" -eq 0 -o "$MODE" = "all" ; then
- $KILL -$SIG $PIDS || {
- echo "$0: $KILL failed. None ${DONE}."
- exit 1
- }
- exit 0
-fi
-
-# There is an argument, so kill the pppd started on that provider.
-PID=`ps axw | grep "[ /]pppd call $1 *\$" | awk '{print $1}'`
-if test -n "$PID" ; then
- $KILL -$SIG $PID || {
- echo "$0: $KILL failed. None ${DONE}."
- exit 1
- }
-else
- echo "$0: I could not find a pppd process for provider '$1'. None ${DONE}."
- exit 1
-fi
-exit 0
diff --git a/abs/core/ppp/pon b/abs/core/ppp/pon
deleted file mode 100644
index 3688505..0000000
--- a/abs/core/ppp/pon
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- -*) echo "
-Usage: pon [provider] [arguments]
-
-If you specify one argument, a PPP connection will be started using
-settings from the appropriate file in the /etc/ppp/peers/ directory, and
-any additional arguments supplied will be passed as extra arguments to
-pppd.
-"
- exit 0
- ;;
-esac
-
-if [ -z "$1" -a ! -f /etc/ppp/peers/provider ]; then
- echo "
-Please configure /etc/ppp/peers/provider or use a command line argument to
-use another file in /etc/ppp/peers/ directory.
-"
- exit 1
-fi
-
-if [ "$1" -a ! -f "/etc/ppp/peers/$1" ]; then
- echo "
-The file /etc/ppp/peers/$1 does not exist.
-"
- exit 1
-fi
-
-exec /usr/sbin/pppd call ${@:-provider}
-
diff --git a/abs/core/ppp/pon.1 b/abs/core/ppp/pon.1
deleted file mode 100644
index bb32205..0000000
--- a/abs/core/ppp/pon.1
+++ /dev/null
@@ -1,121 +0,0 @@
-.\" This manual is published under the GPL.
-.\" All guidelines specified in the GPL apply here.
-.\" To get an ascii file:
-.\" groff -man -Tascii pon.1 > pon.txt
-.\"
-.TH PON 1 "July 2000" "Debian Project" "Debian PPPD"
-.SH NAME
-pon, poff, plog \- starts up, shuts down or lists the log of PPP connections
-.SH SYNOPSIS
-.B pon
-[ isp-name [ options ] ]
-.br
-.B poff
-[ -r ] [ -d ] [ -c ] [ -a ] [ -h ] [ isp-name ]
-.br
-.B plog
-[ arguments ]
-.SH DESCRIPTION
-This manual page describes the \fBpon\fP, \fBplog\fP and \fBpoff\fP
-scripts, which allow users to control PPP connections.
-..
-.SS pon
-\fBpon\fP, invoked without arguments, runs the \fI/etc/ppp/ppp_on_boot\fP
-file, if it exists and is executable. Otherwise, a PPP connection will be
-started using configuration from \fI/etc/ppp/peers/provider\fP.
-This is the default behaviour unless an \fBisp-name\fP argument is given.
-.PP
-For instance, to use ISP configuration "myisp" run:
-.IP
-pon myisp
-.PP
-\fBpon\fP will then use the options file \fI/etc/ppp/peers/myisp\fP.
-You can pass additional \fBoptions\fP after the ISP name, too.
-\fBpon\fP can be used to run multiple, simultaneous PPP connections.
-..
-.SS poff
-\fBpoff\fP closes a PPP connection. If more than one PPP connection exists,
-the one named in the argument to \fBpoff\fP will be killed, e.g.
-.IP
-poff myprovider2
-.PP
-will terminate the connection to myprovider2, and leave the PPP connections
-to e.g. "myprovider1" or "myprovider3" up and running.
-.PP
-\fBpoff\fP takes the following command line options:
-.RS
-.TP
-.B "\-r"
-causes the connection to be redialed after it is dropped.
-.TP
-.B "\-d"
-toggles the state of pppd's debug option.
-.TP
-.B "\-c"
-causes
-.BR pppd (8)
-to renegotiate compression.
-.TP
-.B "\-a"
-stops all running ppp connections. If the argument \fBisp-name\fP
-is given it will be ignored.
-.TP
-.B "\-h"
-displays help information.
-.TP
-.B "\-v"
-prints the version and exits.
-.PP
-If no argument is given, \fBpoff\fP will stop or signal pppd if and only
-if there is exactly one running. If more than one connection is active,
-it will exit with an error code of 1.
-..
-.SS plog
-\fBplog\fP shows you the last few lines of \fI/var/log/ppp.log\fP. If that
-file doesn't exist, it shows you the last few lines of your
-\fI/var/log/syslog\fP file, but excluding the lines not generated by pppd.
-This script makes use of the
-.BR tail (1)
-command, so arguments that can be passed to
-.BR tail (1)
-can also be passed to \fBplog\fP.
-.PP
-Note: the \fBplog\fP script can only be used by root or another system
-administrator in group "adm", due to security reasons. Also, to have all
-pppd-generated information in one logfile, that plog can show, you need the
-following line in your \fI/etc/syslog.conf\fP file:
-.PP
-local2.* -/var/log/ppp.log
-.RE
-.SH FILES
-.TP
-.I /etc/ppp/options
-PPPd system options file.
-.TP
-.I /etc/ppp/pap-secrets
-System PAP passwords file.
-.TP
-.I /etc/ppp/chap-secrets
-System CHAP passwords file.
-.TP
-.I /etc/ppp/peers/
-Directory holding the peer options files. The default file is called
-\fIprovider\fP.
-.TP
-.I /etc/chatscripts/provider
-The chat script invoked from the default \fI/etc/ppp/peers/provider\fP.
-.TP
-.I /var/log/ppp.log
-The default PPP log file.
-.SH AUTHORS
-The p-commands were written by Christoph Lameter <clameter@debian.org>.
-Updated and revised by Philip Hands <phil@hands.com>.
-.br
-This manual was written by Othmar Pasteka <othmar@tron.at>. Modified
-by Rob Levin <lilo@openprojects.net>, with some extensions taken from
-the old p-commands manual written by John Hasler <jhasler@debian.org>.
-.SH "SEE ALSO"
-.BR pppd (8),
-.BR chat (8),
-.BR tail (1).
-
diff --git a/abs/core/ppp/ppp b/abs/core/ppp/ppp
deleted file mode 100644
index 16e01ba..0000000
--- a/abs/core/ppp/ppp
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/pppd`
-case "$1" in
- start)
- stat_busy "Starting PPP daemon"
- [ -z "$PID" ] && /usr/bin/pon
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon ppp
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping PPP daemon"
- [ ! -z "$PID" ] && poff -a &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon ppp
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
diff --git a/abs/core/ppp/ppp-2.4.6-makefiles.patch b/abs/core/ppp/ppp-2.4.6-makefiles.patch
new file mode 100644
index 0000000..5fc7bcc
--- /dev/null
+++ b/abs/core/ppp/ppp-2.4.6-makefiles.patch
@@ -0,0 +1,270 @@
+diff -Nur ppp-2.4.6.orig/chat/Makefile.linux ppp-2.4.6/chat/Makefile.linux
+--- ppp-2.4.6.orig/chat/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/chat/Makefile.linux 2014-02-24 09:00:16.666577906 +0100
+@@ -1,7 +1,7 @@
+ # $Id: Makefile.linux,v 1.15 2006/06/04 05:07:46 paulus Exp $
+
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ MANDIR = $(DESTDIR)/share/man/man8
+
+ CDEF1= -DTERMIOS # Use the termios structure
+@@ -10,7 +10,8 @@
+ CDEF4= -DFNDELAY=O_NDELAY # Old name value
+ CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
+
+-COPTS= -O2 -g -pipe
++COPTS= @CFLAGS@
++LDFLAGS= @LDFLAGS@
+ CFLAGS= $(COPTS) $(CDEFS)
+
+ INSTALL= install
+@@ -21,7 +22,7 @@
+ $(CC) -o chat chat.o
+
+ chat.o: chat.c
+- $(CC) -c $(CFLAGS) -o chat.o chat.c
++ $(CC) -c $(CFLAGS) $(LDFLAGS) -o chat.o chat.c
+
+ install: chat
+ mkdir -p $(BINDIR) $(MANDIR)
+diff -Nur ppp-2.4.6.orig/configure ppp-2.4.6/configure
+--- ppp-2.4.6.orig/configure 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/configure 2014-02-24 09:00:16.743242620 +0100
+@@ -185,7 +185,10 @@
+ rm -f $2
+ if [ -f $1 ]; then
+ echo " $2 <= $1"
+- sed -e "s,@DESTDIR@,$DESTDIR,g" -e "s,@SYSCONF@,$SYSCONF,g" $1 >$2
++ sed -e "s|@DESTDIR@|$DESTDIR|g" \
++ -e "s|@SYSCONF@|$SYSCONF|g" \
++ -e "s|@CFLAGS@|$CFLAGS|g" \
++ -e "s|@LDFLAGS@|$LDFLAGS|g" $1 >$2
+ fi
+ }
+
+diff -Nur ppp-2.4.6.orig/linux/Makefile.top ppp-2.4.6/linux/Makefile.top
+--- ppp-2.4.6.orig/linux/Makefile.top 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/linux/Makefile.top 2014-02-24 09:00:16.743242620 +0100
+@@ -1,7 +1,7 @@
+ # PPP top-level Makefile for Linux.
+
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ INCDIR = $(DESTDIR)/include
+ MANDIR = $(DESTDIR)/share/man
+ ETCDIR = $(INSTROOT)@SYSCONF@/ppp
+diff -Nur ppp-2.4.6.orig/pppd/Makefile.linux ppp-2.4.6/pppd/Makefile.linux
+--- ppp-2.4.6.orig/pppd/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppd/Makefile.linux 2014-02-24 09:00:16.743242620 +0100
+@@ -5,7 +5,7 @@
+
+ # Default installation locations
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ MANDIR = $(DESTDIR)/share/man/man8
+ INCDIR = $(DESTDIR)/include
+
+@@ -32,7 +32,8 @@
+
+ # CC = gcc
+ #
+-COPTS = -O2 -pipe -Wall -g
++COPTS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ LIBS =
+
+ # Uncomment the next 2 lines to include support for Microsoft's
+diff -Nur ppp-2.4.6.orig/pppd/plugins/Makefile.linux ppp-2.4.6/pppd/plugins/Makefile.linux
+--- ppp-2.4.6.orig/pppd/plugins/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppd/plugins/Makefile.linux 2014-02-24 09:00:16.779908379 +0100
+@@ -1,11 +1,11 @@
+ #CC = gcc
+-COPTS = -O2 -g
++COPTS = @CFLAGS@
+ CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+-LDFLAGS = -shared
++LDFLAGS = @LDFLAGS@ -shared
+ INSTALL = install
+
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ MANDIR = $(DESTDIR)/share/man/man8
+ LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+
+diff -Nur ppp-2.4.6.orig/pppd/plugins/pppoatm/Makefile.linux ppp-2.4.6/pppd/plugins/pppoatm/Makefile.linux
+--- ppp-2.4.6.orig/pppd/plugins/pppoatm/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppd/plugins/pppoatm/Makefile.linux 2014-02-24 09:00:16.809907637 +0100
+@@ -1,7 +1,7 @@
+ #CC = gcc
+-COPTS = -O2 -g
++COPTS = @CFLAGS@
+ CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
+-LDFLAGS = -shared
++LDFLAGS = @LDFLAGS@
+ INSTALL = install
+
+ #***********************************************************************
+@@ -33,7 +33,7 @@
+ all: $(PLUGIN)
+
+ $(PLUGIN): $(PLUGIN_OBJS)
+- $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++ $(CC) $(CFLAGS) -o $@ $(LDFLAGS) -shared $^ $(LIBS)
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+diff -Nur ppp-2.4.6.orig/pppd/plugins/pppol2tp/Makefile.linux ppp-2.4.6/pppd/plugins/pppol2tp/Makefile.linux
+--- ppp-2.4.6.orig/pppd/plugins/pppol2tp/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppd/plugins/pppol2tp/Makefile.linux 2014-02-24 09:01:06.325349425 +0100
+@@ -1,12 +1,12 @@
+ #CC = gcc
+-COPTS = -O2 -g
++COPTS = @CFLAGS@
+ CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC
+-LDFLAGS = -shared
++LDFLAGS = @LDFLAGS@
+ INSTALL = install
+
+ #***********************************************************************
+
+-DESTDIR = @DESTDIR@
++DESTDIR = $(INSTROOT)@DESTDIR@
+ LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+
+ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
+@@ -16,7 +16,7 @@
+ all: $(PLUGINS)
+
+ %.so: %.o
+- $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++ $(CC) $(CFLAGS) -o $@ $(LDFLAGS) -shared $^ $(LIBS)
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+diff -Nur ppp-2.4.6.orig/pppd/plugins/radius/Makefile.linux ppp-2.4.6/pppd/plugins/radius/Makefile.linux
+--- ppp-2.4.6.orig/pppd/plugins/radius/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppd/plugins/radius/Makefile.linux 2014-02-24 09:00:16.809907637 +0100
+@@ -12,7 +12,8 @@
+ INSTALL = install
+
+ PLUGIN=radius.so radattr.so radrealms.so
+-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
++CFLAGS=@CFLAGS@ -I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
++LDFLAGS=@LDFLAGS@
+
+ # Uncomment the next line to include support for Microsoft's
+ # MS-CHAP authentication protocol.
+@@ -43,13 +44,13 @@
+ $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
+
+ radius.so: radius.o libradiusclient.a
+- $(CC) -o radius.so -shared radius.o libradiusclient.a
++ $(CC) -o radius.so -shared $(LDFLAGS) radius.o libradiusclient.a
+
+ radattr.so: radattr.o
+- $(CC) -o radattr.so -shared radattr.o
++ $(CC) -o radattr.so -shared $(LDFLAGS) radattr.o
+
+ radrealms.so: radrealms.o
+- $(CC) -o radrealms.so -shared radrealms.o
++ $(CC) -o radrealms.so -shared $(LDFLAGS) radrealms.o
+
+ CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
+ clientid.o sendserver.o lock.o util.o md5.o
+diff -Nur ppp-2.4.6.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.6/pppd/plugins/rp-pppoe/Makefile.linux
+--- ppp-2.4.6.orig/pppd/plugins/rp-pppoe/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppd/plugins/rp-pppoe/Makefile.linux 2014-02-24 09:00:16.809907637 +0100
+@@ -15,7 +15,7 @@
+ #***********************************************************************
+
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
+
+ PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
+@@ -25,12 +25,14 @@
+ # Version is set ONLY IN THE MAKEFILE! Don't delete this!
+ RP_VERSION=3.8p
+
+-COPTS=-O2 -g
++COPTS=@CFLAGS@
+ CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
++LDFLAGS=@LDFLAGS@
++
+ all: rp-pppoe.so pppoe-discovery
+
+ pppoe-discovery: pppoe-discovery.o debug.o
+- $(CC) -o pppoe-discovery pppoe-discovery.o debug.o
++ $(CC) -o pppoe-discovery $(LDFLAGS) pppoe-discovery.o debug.o
+
+ pppoe-discovery.o: pppoe-discovery.c
+ $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
+@@ -39,7 +41,7 @@
+ $(CC) $(CFLAGS) -c -o debug.o debug.c
+
+ rp-pppoe.so: plugin.o discovery.o if.o common.o
+- $(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
++ $(CC) -o rp-pppoe.so -shared $(LDFLAGS) plugin.o discovery.o if.o common.o
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+diff -Nur ppp-2.4.6.orig/pppdump/Makefile.linux ppp-2.4.6/pppdump/Makefile.linux
+--- ppp-2.4.6.orig/pppdump/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppdump/Makefile.linux 2014-02-24 09:00:16.809907637 +0100
+@@ -1,8 +1,9 @@
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ MANDIR = $(DESTDIR)/share/man/man8
+
+-CFLAGS= -O -I../include/net
++CFLAGS = @CFLAGS@ -I../include/net
++LDFLAGS = @LDFLAGS@
+ OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
+
+ INSTALL= install
+@@ -10,7 +11,7 @@
+ all: pppdump
+
+ pppdump: $(OBJS)
+- $(CC) -o pppdump $(OBJS)
++ $(CC) $(LDFLAGS) -o pppdump $(OBJS)
+
+ clean:
+ rm -f pppdump $(OBJS) *~
+diff -Nur ppp-2.4.6.orig/pppstats/Makefile.linux ppp-2.4.6/pppstats/Makefile.linux
+--- ppp-2.4.6.orig/pppstats/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
++++ ppp-2.4.6/pppstats/Makefile.linux 2014-02-24 09:00:16.809907637 +0100
+@@ -3,14 +3,15 @@
+ # $Id: Makefile.linux,v 1.9 2006/06/04 05:07:46 paulus Exp $
+ #
+ DESTDIR = $(INSTROOT)@DESTDIR@
+-BINDIR = $(DESTDIR)/sbin
++BINDIR = $(DESTDIR)/bin
+ MANDIR = $(DESTDIR)/share/man/man8
+
+ PPPSTATSRCS = pppstats.c
+ PPPSTATOBJS = pppstats.o
+
+ #CC = gcc
+-COPTS = -O
++COPTS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ COMPILE_FLAGS = -I../include
+ LIBS =
+
+@@ -26,7 +27,7 @@
+ $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+
+ pppstats: $(PPPSTATSRCS)
+- $(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o pppstats pppstats.c $(LIBS)
+
+ clean:
+ rm -f pppstats *~ #* core
diff --git a/abs/core/ppp/ppp.systemd b/abs/core/ppp/ppp.systemd
new file mode 100644
index 0000000..8a963af
--- /dev/null
+++ b/abs/core/ppp/ppp.systemd
@@ -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