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 | |
parent | 952934d8b0c304ba8710fdebcc707151b26c08c9 (diff) | |
download | alpine_aports-2e18f0f3e3b19fe17d79f49283bc483350cb044c.tar.bz2 alpine_aports-2e18f0f3e3b19fe17d79f49283bc483350cb044c.tar.xz alpine_aports-2e18f0f3e3b19fe17d79f49283bc483350cb044c.zip |
testing/rp-pppoe: new aport
-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 0000000000..fa61af9c50 --- /dev/null +++ b/testing/rp-pppoe/APKBUILD | |||
@@ -0,0 +1,37 @@ | |||
1 | # Contributor: Francesco Colista <francesco.colista@gmail.com> | ||
2 | # Maintainer: Francesco Colista <francesco.colista@gmail.com> | ||
3 | pkgname=rp-pppoe | ||
4 | pkgver=3.10 | ||
5 | pkgrel=0 | ||
6 | pkgdesc="Roaring Penguin\'s Point-to-Point Protocol over Ethernet client" | ||
7 | url="http://www.roaringpenguin.com/pppoe/" | ||
8 | license="LGPL" | ||
9 | depends= | ||
10 | makedepends= | ||
11 | install= | ||
12 | subpackages= | ||
13 | source="http://www.roaringpenguin.com/files/download/rp-pppoe-$pkgver.tar.gz | ||
14 | rp-pppoe.initd" | ||
15 | |||
16 | _builddir="$srcdir"/$pkgname-$pkgver | ||
17 | |||
18 | build() { | ||
19 | cd "$_builddir"/src | ||
20 | ./configure --prefix=/usr \ | ||
21 | --sysconfdir=/etc \ | ||
22 | --mandir=/usr/share/man \ | ||
23 | --infodir=/usr/share/info | ||
24 | |||
25 | make all || return 1 | ||
26 | } | ||
27 | |||
28 | package() { | ||
29 | cd "$_builddir"/src | ||
30 | |||
31 | make DESTDIR="$pkgdir" install | ||
32 | |||
33 | install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname | ||
34 | } | ||
35 | |||
36 | md5sums="d58a13cc4185bca6121a606ff456dec0 rp-pppoe-3.10.tar.gz | ||
37 | 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 0000000000..871e5d8cd9 --- /dev/null +++ b/testing/rp-pppoe/rp-pppoe.initd | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | |||
4 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
5 | DAEMON=/usr/sbin/pppoe-server | ||
6 | NAME=pppoe-server | ||
7 | |||
8 | # Setup server and service names, Server peer IP, start of IP range for clients peers, amount of peers at same time | ||
9 | PARAMS="-C XGT01 -S RESNET -L 172.19.${BRNUM}.2 -R 172.19.${BRNUM}.100 -N 100" | ||
10 | |||
11 | test -x /usr/sbin/pppoe-server -a -f /etc/ppp/pppoe-server-options || exit 0 | ||
12 | |||
13 | case "$1" in | ||
14 | start) | ||
15 | echo -n "Starting up $NAME " | ||
16 | start-stop-daemon --start --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON -- $PARAMS | ||
17 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
18 | echo "." | ||
19 | ;; | ||
20 | stop) | ||
21 | echo -n "Shutting down $NAME " | ||
22 | start-stop-daemon --stop --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON | ||
23 | echo 0 > /proc/sys/net/ipv4/ip_forward | ||
24 | killall $DAEMON > /dev/null 2>&1 | ||
25 | echo "." | ||
26 | ;; | ||
27 | restart|force-reload) | ||
28 | echo -n "Restarting $NAME " | ||
29 | start-stop-daemon --stop --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON | ||
30 | sleep 1 | ||
31 | start-stop-daemon --start --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON -- $PARAMS | ||
32 | echo "." | ||
33 | ;; | ||
34 | *) | ||
35 | echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" | ||
36 | exit 1 | ||
37 | ;; | ||
38 | esac | ||
39 | |||
40 | exit 0 | ||
41 | |||