Annotation of src/etc/rc.d/ppp, Revision 1.8
1.1 lukem 1: #!/bin/sh
2: #
1.8 ! christos 3: # $NetBSD: ppp,v 1.7 2004/08/13 18:08:03 mycroft Exp $
1.1 lukem 4: #
5:
6: # PROVIDE: ppp
1.3 lukem 7: # REQUIRE: mountcritremote syslogd
1.6 thorpej 8: # BEFORE: SERVERS
1.3 lukem 9: #
10: # Note that this means that syslogd will not be listening on
11: # any PPP addresses. This is considered a feature.
12: #
1.1 lukem 13:
1.7 mycroft 14: $_rc_subr_loaded . /etc/rc.subr
1.1 lukem 15:
16: name="ppp"
17: start_cmd="ppp_start"
1.5 fredb 18: stop_cmd="ppp_stop"
19: sig_stop="-INT"
20: sig_hup="-HUP"
21: hup_cmd="ppp_hup"
22: extra_commands="hup"
1.1 lukem 23:
24: ppp_start()
25: {
26: # /etc/ppp/peers and $ppp_peers contain boot configuration
27: # information for pppd. each value in $ppp_peers that has a
28: # file in /etc/ppp/peers of the same name, will be run as
1.4 hubertf 29: # `pppd call <peer>'.
1.1 lukem 30: #
31: if [ -n "$ppp_peers" ]; then
32: set -- $ppp_peers
33: echo -n "Starting pppd:"
34: while [ $# -ge 1 ]; do
35: peer=$1
36: shift
37: if [ -f /etc/ppp/peers/$peer ]; then
38: pppd call $peer
39: echo -n " $peer"
40: fi
41: done
42: echo "."
1.5 fredb 43: fi
44: }
45:
46: ppp_hup()
47: {
1.8 ! christos 48: pids="$(check_process pppd)"
1.5 fredb 49: if [ -n "$pids" ]; then
50: for pid in $pids; do
51: kill $sig_hup $pid
52: done
53: fi
54: }
55:
56: ppp_stop()
57: {
1.8 ! christos 58: pids="$(check_process pppd)"
1.5 fredb 59: if [ -n "$pids" ]; then
60: for pid in $pids; do
61: kill $sig_stop $pid
62: done
1.1 lukem 63: fi
64: }
65:
1.2 lukem 66: load_rc_config $name
1.1 lukem 67: run_rc_command "$1"
CVSweb <webmaster@jp.NetBSD.org>