Magellan Linux

Annotation of /trunk/ppp/ppp.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 795 - (hide annotations) (download)
Mon May 11 09:39:01 2009 UTC (15 years ago) by niro
File size: 889 byte(s)
etc/sysconfig -> /etc/conf.d

1 niro 303 #!/bin/bash
2 niro 795 # $Header: /root/magellan-cvs/src/ppp/ppp.rc,v 1.5 2009-05-11 09:39:01 niro Exp $
3 niro 303
4     #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
5     #%start: 30
6     #%stop: 30
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13 niro 795 source /etc/conf.d/rc
14 niro 303 source $rc_functions
15    
16 niro 309 [[ -f /etc/conf.d/ppp ]] && source /etc/conf.d/ppp
17    
18 niro 303 PPPD_PID=$(pidof -o %PPID /usr/sbin/pppd)
19    
20     case "$1" in
21     start)
22     echo -e ${COLOREDSTAR}"Starting PPP deamon ..."
23 niro 309 [[ -z ${PPPD_PID} ]] && pon ${PPP_PROVIDER}
24 niro 305 evaluate_retval
25 niro 303
26     update_svcstatus $1
27     splash svc_started "$(basename $0)" 0
28     ;;
29    
30     stop)
31     echo -e ${COLOREDSTAR}"Stopping PPP daemon ..."
32     [[ ! -z ${PPPD_PID} ]] && poff -a &> /dev/null
33 niro 305 evaluate_retval
34 niro 303
35     update_svcstatus $1
36     splash svc_stopped "$(basename $0)" 0
37     ;;
38    
39     restart)
40     $0 stop
41     sleep 1
42     $0 start
43     ;;
44    
45     status)
46     statusproc /usr/sbin/pppd
47     ;;
48    
49     *)
50     echo "Usage: $0 {start|stop|restart|status}"
51     exit 1
52     ;;
53     esac