diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-08-13 11:14:29 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-08-13 11:14:40 +0000 |
commit | 2e18f0f3e3b19fe17d79f49283bc483350cb044c (patch) | |
tree | fde27361ae41c1b62910c13bc1d3138f81bd82ce /testing/rp-pppoe | |
parent | 952934d8b0c304ba8710fdebcc707151b26c08c9 (diff) | |
download | aports-2e18f0f3e3b19fe17d79f49283bc483350cb044c.tar.bz2 aports-2e18f0f3e3b19fe17d79f49283bc483350cb044c.tar.xz |
testing/rp-pppoe: new aport
Diffstat (limited to 'testing/rp-pppoe')
-rw-r--r-- | testing/rp-pppoe/APKBUILD | 37 | ||||
-rw-r--r-- | testing/rp-pppoe/rp-pppoe.initd | 41 |
2 files changed, 78 insertions, 0 deletions
diff --git a/testing/rp-pppoe/APKBUILD b/testing/rp-pppoe/APKBUILD new file mode 100644 index 000000000..fa61af9c5 --- /dev/null +++ b/testing/rp-pppoe/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Francesco Colista <francesco.colista@gmail.com> +# Maintainer: Francesco Colista <francesco.colista@gmail.com> +pkgname=rp-pppoe +pkgver=3.10 +pkgrel=0 +pkgdesc="Roaring Penguin\'s Point-to-Point Protocol over Ethernet client" +url="http://www.roaringpenguin.com/pppoe/" +license="LGPL" +depends= +makedepends= +install= +subpackages= +source="http://www.roaringpenguin.com/files/download/rp-pppoe-$pkgver.tar.gz + rp-pppoe.initd" + +_builddir="$srcdir"/$pkgname-$pkgver + +build() { + cd "$_builddir"/src + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + + make all || return 1 +} + +package() { + cd "$_builddir"/src + + make DESTDIR="$pkgdir" install + + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +} + +md5sums="d58a13cc4185bca6121a606ff456dec0 rp-pppoe-3.10.tar.gz +83975fce01d71795c8df697c653586fe rp-pppoe.initd" diff --git a/testing/rp-pppoe/rp-pppoe.initd b/testing/rp-pppoe/rp-pppoe.initd new file mode 100644 index 000000000..871e5d8cd --- /dev/null +++ b/testing/rp-pppoe/rp-pppoe.initd @@ -0,0 +1,41 @@ +#!/bin/sh +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/pppoe-server +NAME=pppoe-server + +# Setup server and service names, Server peer IP, start of IP range for clients peers, amount of peers at same time +PARAMS="-C XGT01 -S RESNET -L 172.19.${BRNUM}.2 -R 172.19.${BRNUM}.100 -N 100" + +test -x /usr/sbin/pppoe-server -a -f /etc/ppp/pppoe-server-options || exit 0 + +case "$1" in + start) + echo -n "Starting up $NAME " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON -- $PARAMS + echo 1 > /proc/sys/net/ipv4/ip_forward + echo "." + ;; + stop) + echo -n "Shutting down $NAME " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON + echo 0 > /proc/sys/net/ipv4/ip_forward + killall $DAEMON > /dev/null 2>&1 + echo "." + ;; + restart|force-reload) + echo -n "Restarting $NAME " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON -- $PARAMS + echo "." + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 + |