mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-16 20:21:58 +02:00
Upgrade rp-pppoe from 3.11 to 3.12. Signed-off-by: Dai Caiyun <daicy.fnst@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
60 lines
1.4 KiB
Bash
Executable File
60 lines
1.4 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
test -f /usr/sbin/pppoe-server || exit 0
|
|
test -f /etc/default/pppoe-server && . /etc/default/pppoe-server
|
|
|
|
case $1 in
|
|
start)
|
|
OPTIONS=""
|
|
if [ -n "$MSS" ]; then
|
|
OPTIONS="$OPTIONS -m $MSS"
|
|
fi
|
|
if [ -n "$DEVICES" ]; then
|
|
for i in $DEVICES; do
|
|
OPTIONS="$OPTIONS -I $i"
|
|
done
|
|
fi
|
|
if [ -n "$LOCAL_IP" ]; then
|
|
OPTIONS="$OPTIONS -L $LOCAL_IP"
|
|
fi
|
|
if [ -n "$REMOTE_IP" ]; then
|
|
OPTIONS="$OPTIONS -R $REMOTE_IP"
|
|
fi
|
|
if [ -n "$SERVICE_NAME" ]; then
|
|
OPTIONS="$OPTIONS -S $SERVICE_NAME"
|
|
fi
|
|
if [ -n "$MAX_SESSIONS" ]; then
|
|
OPTIONS="$OPTIONS -N $MAX_SESSIONS"
|
|
fi
|
|
if [ -n "$ACCESS_CONCENTRATOR_NAME" ]; then
|
|
OPTIONS="$OPTIONS -C $ACCESS_CONCENTRATOR_NAME"
|
|
fi
|
|
echo -n "Starting PPPoE server: pppoe-server"
|
|
start-stop-daemon --start --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
|
|
echo "."
|
|
;;
|
|
stop)
|
|
echo -n "Stopping PPPoE server: pppoe-server"
|
|
start-stop-daemon --stop --quiet --exec /usr/sbin/pppoe-server -- $OPTIONS
|
|
echo "."
|
|
;;
|
|
status)
|
|
pid=$(pidof pppoe-server)
|
|
if [ -n "$pid" ] ; then
|
|
echo "Running with pid $pid"
|
|
else
|
|
echo "Not running"
|
|
fi
|
|
;;
|
|
restart|force-reload)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: /etc/init.d/pppoe-server {start|stop|restart|force-reload}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|