]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/ppp/files/init
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / ppp / files / init
1 #!/bin/sh
2 #
3 #   /etc/init.d/ppp: start or stop PPP link.
4 #
5 # If you want PPP started on boot time (most dialup systems won't need it)
6 # rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
7 # follow the instructions in the comments in that file.
8
9 test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
10 if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
11
12 case "$1" in
13   start)
14       echo -n "Starting up PPP link: pppd"
15       if [ "$RUNFILE" = "1" ]; then
16         /etc/ppp/ppp_on_boot
17       else
18         pppd call provider
19       fi
20       echo "."
21     ;;
22   stop)
23       echo -n "Shutting down PPP link: pppd"
24       if [ "$RUNFILE" = "1" ]; then
25         poff
26       else
27         poff provider
28       fi
29       echo "."
30     ;;
31   restart|force-reload)
32     echo -n "Restarting PPP link: pppd"
33     if [ "$RUNFILE" = "1" ]; then      
34       poff
35       sleep 5
36       /etc/ppp/ppp_on_boot
37     else                  
38       poff provider
39       sleep 5
40       pppd call provider
41     fi
42     echo "."
43     ;;
44   *)
45       echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
46       exit 1
47     ;;
48 esac
49
50 exit 0