dma: move sender into queue
[dragonfly.git] / etc / rc.d / ppp
blob3e7ea0d5ded0345720a36c6db2b3922bc1ab8574
1 #!/bin/sh
3 # $NetBSD: ppp,v 1.6 2002/03/22 04:33:59 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/ppp,v 1.2 2002/06/13 22:14:36 gordon Exp $
5 # $DragonFly: src/etc/rc.d/ppp,v 1.3 2005/11/19 21:47:32 swildner Exp $
8 # PROVIDE: ppp
9 # REQUIRE: mountcritremote syslogd
10 # BEFORE: SERVERS
12 # Note that this means that syslogd will not be listening on
13 # any PPP addresses. This is considered a feature.
16 . /etc/rc.subr
18 name="ppp"
19 start_cmd="ppp_start"
20 stop_cmd="ppp_stop"
21 sig_stop="-INT"
22 sig_hup="-HUP"
23 hup_cmd="ppp_hup"
24 extra_commands="hup"
26 ppp_start()
28 # /etc/ppp/peers and $ppp_peers contain boot configuration
29 # information for pppd. each value in $ppp_peers that has a
30 # file in /etc/ppp/peers of the same name, will be run as
31 # `pppd call <peer>'.
33 if [ -n "$ppp_peers" ]; then
34 set -- $ppp_peers
35 echo -n "Starting pppd:"
36 while [ $# -ge 1 ]; do
37 peer=$1
38 shift
39 if [ -f /etc/ppp/peers/$peer ]; then
40 pppd call $peer
41 echo -n " $peer"
43 done
44 echo "."
48 ppp_hup()
50 pids="`check_process pppd`"
51 if [ -n "$pids" ]; then
52 for pid in $pids; do
53 kill $sig_hup $pid
54 done
58 ppp_stop()
60 pids="`check_process pppd`"
61 if [ -n "$pids" ]; then
62 for pid in $pids; do
63 kill $sig_stop $pid
64 done
68 load_rc_config $name
69 run_rc_command "$1"