Annotation of /trunk/ppp/ppp.rc
Parent Directory | Revision Log
Revision 305 -
(hide annotations)
(download)
Sun Aug 19 02:32:17 2007 UTC (17 years, 2 months ago) by niro
File size: 824 byte(s)
Sun Aug 19 02:32:17 2007 UTC (17 years, 2 months ago) by niro
File size: 824 byte(s)
-fixed rc script
1 | niro | 303 | #!/bin/bash |
2 | niro | 305 | # $Header: /root/magellan-cvs/src/ppp/ppp.rc,v 1.3 2007-08-19 02:32:17 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 | source /etc/sysconfig/rc | ||
14 | source $rc_functions | ||
15 | |||
16 | PPPD_PID=$(pidof -o %PPID /usr/sbin/pppd) | ||
17 | |||
18 | case "$1" in | ||
19 | start) | ||
20 | echo -e ${COLOREDSTAR}"Starting PPP deamon ..." | ||
21 | niro | 304 | [[ -z ${PPPD_PID} ]] && pon |
22 | niro | 305 | evaluate_retval |
23 | niro | 303 | |
24 | update_svcstatus $1 | ||
25 | splash svc_started "$(basename $0)" 0 | ||
26 | ;; | ||
27 | |||
28 | stop) | ||
29 | echo -e ${COLOREDSTAR}"Stopping PPP daemon ..." | ||
30 | [[ ! -z ${PPPD_PID} ]] && poff -a &> /dev/null | ||
31 | niro | 305 | evaluate_retval |
32 | niro | 303 | |
33 | update_svcstatus $1 | ||
34 | splash svc_stopped "$(basename $0)" 0 | ||
35 | ;; | ||
36 | |||
37 | restart) | ||
38 | $0 stop | ||
39 | sleep 1 | ||
40 | $0 start | ||
41 | ;; | ||
42 | |||
43 | status) | ||
44 | statusproc /usr/sbin/pppd | ||
45 | ;; | ||
46 | |||
47 | *) | ||
48 | echo "Usage: $0 {start|stop|restart|status}" | ||
49 | exit 1 | ||
50 | ;; | ||
51 | esac |