diff options
author | Francesco Colista <francesco.colista@gmail.com> | 2011-01-04 13:05:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-01-04 14:41:13 +0000 |
commit | 2f3a2d33878fdd1f156a5380c0748c934605c913 (patch) | |
tree | 14ede6a9291c9795e476490870b5ca1221e7bac4 /testing/rp-pppoe | |
parent | 2110fabefdf18c73c055f5c7cfce974a8797f661 (diff) | |
download | aports-2f3a2d33878fdd1f156a5380c0748c934605c913.tar.bz2 aports-2f3a2d33878fdd1f156a5380c0748c934605c913.tar.xz |
testing/rp-pppoe: use runscript' as first line in
Diffstat (limited to 'testing/rp-pppoe')
-rw-r--r-- | testing/rp-pppoe/APKBUILD | 2 | ||||
-rw-r--r-- | testing/rp-pppoe/rp-pppoe.initd | 57 |
2 files changed, 24 insertions, 35 deletions
diff --git a/testing/rp-pppoe/APKBUILD b/testing/rp-pppoe/APKBUILD index 40893dae12..403f697686 100644 --- a/testing/rp-pppoe/APKBUILD +++ b/testing/rp-pppoe/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <francesco.colista@gmail.com> pkgname=rp-pppoe pkgver=3.10 -pkgrel=1 +pkgrel=2 pkgdesc="Roaring Penguin\'s Point-to-Point Protocol over Ethernet client" url="http://www.roaringpenguin.com/pppoe/" arch="x86 x86_64" diff --git a/testing/rp-pppoe/rp-pppoe.initd b/testing/rp-pppoe/rp-pppoe.initd index 7c5bdf6c09..3e6ce3edba 100644 --- a/testing/rp-pppoe/rp-pppoe.initd +++ b/testing/rp-pppoe/rp-pppoe.initd @@ -1,41 +1,30 @@ -#!/bin/sh -# +#!/sbin/runscript -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/pppoe-server -NAME=pppoe-server +depend() { + need net +} -# 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 PPPoEC -L 172.19.${BRNUM}.2 -R 172.19.${BRNUM}.100 -N 100" +start() { + ebegin "Starting PPPOE Server" + test -x /usr/sbin/pppoe-server -a -f /etc/ppp/pppoe-server-options || exit 0 + start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS} + echo 1 > /proc/sys/net/ipv4/ip_forward + eend $? +} -test -x /usr/sbin/pppoe-server -a -f /etc/ppp/pppoe-server-options || exit 0 +stop () { + ebegin "Stopping PPPOE Server" + start-stop-daemon --stop --exec /usr/sbin/pppoe-server + echo 0 > /proc/sys/net/ipv4/ip_forward + eend $? +} -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 +restart () { + ebegin "Restarting PPPOE Server" + start-stop-daemon --stop --exec /usr/sbin/pppoe-server sleep 1 - start-stop-daemon --start --quiet --pidfile /var/run/$NAME/$NAME.pid --exec $DAEMON -- $PARAMS + start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS} + echo 1 > /proc/sys/net/ipv4/ip_forward echo "." - ;; - *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 +} |