summaryrefslogtreecommitdiff
path: root/core/rp-pppoe
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-12-29 02:13:48 -0800
committerroot <root@rshg054.dnsready.net>2012-12-29 02:13:48 -0800
commit5dd7ed82e788ebad2e920e0f2db7468cc6547cfe (patch)
treef467412e09912ababcd8fe6c05193d829f514dcd /core/rp-pppoe
parent3009e8addb4a894329bf8ab3e8fb763361833978 (diff)
Sat Dec 29 02:10:20 PST 2012
Diffstat (limited to 'core/rp-pppoe')
-rw-r--r--core/rp-pppoe/PKGBUILD36
-rwxr-xr-xcore/rp-pppoe/adsl35
-rw-r--r--core/rp-pppoe/adsl.service10
-rw-r--r--core/rp-pppoe/rp-pppoe.install12
4 files changed, 93 insertions, 0 deletions
diff --git a/core/rp-pppoe/PKGBUILD b/core/rp-pppoe/PKGBUILD
new file mode 100644
index 000000000..920dcd552
--- /dev/null
+++ b/core/rp-pppoe/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 167376 2012-10-01 18:24:40Z eric $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+# Contributor: orelien <aurelien.foret@wanadoo.fr>
+
+pkgname=rp-pppoe
+pkgver=3.11
+pkgrel=1
+pkgdesc="Roaring Penguin's Point-to-Point Protocol over Ethernet client"
+arch=('i686' 'x86_64')
+url="http://www.roaringpenguin.com/pppoe/"
+license=('GPL')
+depends=('ppp>=2.4.5' 'sh' 'net-tools')
+backup=(etc/ppp/pppoe.conf etc/ppp/firewall-standalone etc/ppp/firewall-masq
+ etc/ppp/pppoe-server-options)
+options=('!makeflags')
+install=rp-pppoe.install
+source=(http://www.roaringpenguin.com/files/download/rp-pppoe-$pkgver.tar.gz{,.sig}
+ adsl adsl.service)
+md5sums=('13b5900c56bd602df6cc526e5e520722'
+ '8fc724aa146dba52ef7b3fbe5b8784c6'
+ 'adace1ad441aa88dcb3db52fb7f9c97f'
+ 'af234125f956f3a356ab0d0fcaa9e8a2')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver/src"
+ ./configure --prefix=/usr --enable-plugin
+ make PLUGIN_DIR="/usr/lib/rp-pppoe" all rp-pppoe.so
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver/src"
+ make PLUGIN_DIR="/usr/lib/rp-pppoe" DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir/adsl" "$pkgdir/etc/rc.d/adsl"
+ install -Dm755 "$srcdir/adsl.service" "$pkgdir/usr/lib/systemd/system/adsl.service"
+}
diff --git a/core/rp-pppoe/adsl b/core/rp-pppoe/adsl
new file mode 100755
index 000000000..33bd91839
--- /dev/null
+++ b/core/rp-pppoe/adsl
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting ADSL Connection"
+ /usr/sbin/pppoe-start &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon adsl
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping ADSL Connection"
+ /usr/sbin/pppoe-stop &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon adsl
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/core/rp-pppoe/adsl.service b/core/rp-pppoe/adsl.service
new file mode 100644
index 000000000..324164943
--- /dev/null
+++ b/core/rp-pppoe/adsl.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ADSL Deamon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/pppoe-start
+ExecStop=/usr/sbin/pppoe-stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/core/rp-pppoe/rp-pppoe.install b/core/rp-pppoe/rp-pppoe.install
new file mode 100644
index 000000000..1d4bccce2
--- /dev/null
+++ b/core/rp-pppoe/rp-pppoe.install
@@ -0,0 +1,12 @@
+#arg 1: the new package version
+post_install() {
+echo ">>> The kernel-mode plugin has a new place."
+echo ">>> It's now located under /usr/lib/rp-pppoe/rp-pppoe.so"
+echo ">>> Change LINUX_PLUGIN to the new path in your /etc/ppp/pppoe.conf"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}