miniupnpd 1.9 (20160113)
[tomato.git] / release / src / router / rp-pppoe / scripts / pppoe-init-suse.in
blob28376f4f21605bc7362d6a070fdb56a8f1462ef1
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.
13 # Modifed to work with SuSE 6.4 linux by Gary Cameron.
15 # Source function library.
16 #. /etc/rc.d/init.d/functions # For red hat?
17 . /etc/rc.config # For SuSE, enables setting from /etc/rc.config
19 #Tweak this
20 restart_time=120
22 # From AUTOCONF
23 prefix=@prefix@
24 exec_prefix=@exec_prefix@
26 # Paths to programs
27 START=@sbindir@/pppoe-start
28 STOP=@sbindir@/pppoe-stop
29 STATUS=@sbindir@/pppoe-status
31 test "$PPPoE_START" = "yes" || exit 0
33 # The echo return value for success (defined in /etc/rc.config).
34 return=$rc_done
35 case "$1" in
36 start)
37 echo -n "Bringing up PPPoE link"
38 $START > /dev/null 2>&1 || return=$rc_failed
39 echo -e "$return"
42 stop)
43 echo -n "Shutting down PPPoE link"
44 $STOP > /dev/null 2>&1 || return=$rc_failed
45 echo -e "$return"
48 restart)
49 $0 stop
50 echo "Waiting" $restart_time "seconds for the host to reset itself"
51 sleep $restart_time #Note: Need time for host to reset itself
52 $0 start
55 status)
56 $STATUS
60 echo "Usage: pppoe {start|stop|restart|status}"
61 exit 1
62 esac
64 exit 0