miniupnpd 1.9 (20160113)
[tomato.git] / release / src / router / rp-pppoe / scripts / pppoe-init.in
blob26dbe0b5f53c06b1eae480151154762cb9287918
1 #!/bin/sh
3 # pppoe This script starts or stops a PPPoE connection
5 # chkconfig: 2345 99 01
6 # description: Connects to PPPoE provider
8 # LIC: GPL
10 # Copyright (C) 2000 Roaring Penguin Software Inc. This software may
11 # be distributed under the terms of the GNU General Public License, version
12 # 2 or any later version.
14 # Source function library if it exists
15 test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
17 # From AUTOCONF
18 prefix=@prefix@
19 exec_prefix=@exec_prefix@
21 # Paths to programs
22 START=@sbindir@/pppoe-start
23 STOP=@sbindir@/pppoe-stop
24 STATUS=@sbindir@/pppoe-status
25 case "$1" in
26 start)
27 echo -n "Bringing up PPPoE link"
29 $START
30 if [ $? = 0 ] ; then
31 touch /var/lock/subsys/pppoe
32 echo_success
33 else
34 echo_failure
36 echo ""
39 stop)
40 echo -n "Shutting down PPPoE link"
42 $STOP > /dev/null 2>&1
43 if [ $? = 0 ] ; then
44 rm -f /var/lock/subsys/pppoe
45 echo_success
46 else
47 echo_failure
49 echo ""
52 restart)
53 $0 stop
54 $0 start
57 status)
58 $STATUS
62 echo "Usage: pppoe {start|stop|restart|status}"
63 exit 1
64 esac
66 exit 0