Home | History | Annotate | Line # | Download | only in rc.d
ppp revision 1.2
      1 #!/bin/sh
      2 #
      3 # $NetBSD: ppp,v 1.2 2000/05/13 08:45:08 lukem Exp $
      4 #
      5 
      6 #	should provide `network' perhaps?
      7 # PROVIDE: ppp
      8 #	note that this means that syslogd will not be listening on
      9 #	any PPP addresses.  this is considered a feature.
     10 # REQUIRE: systemfs syslogd
     11 
     12 . /etc/rc.subr
     13 
     14 name="ppp"
     15 start_cmd="ppp_start"
     16 stop_cmd=":"
     17 
     18 ppp_start()
     19 {
     20 	#	/etc/ppp/peers and $ppp_peers contain boot configuration
     21 	#	information for pppd.  each value in $ppp_peers that has a
     22 	#	file in /etc/ppp/peers of the same name, will be run as
     23 	#	`pppd <peer>'.
     24 	#
     25 	if [ -n "$ppp_peers" ]; then
     26 		set -- $ppp_peers
     27 		echo -n "Starting pppd:"
     28 		while [ $# -ge 1 ]; do
     29 			peer=$1
     30 			shift
     31 			if [ -f /etc/ppp/peers/$peer ]; then
     32 				pppd call $peer
     33 				echo -n " $peer"
     34 			fi
     35 		done
     36 		echo "."
     37 	fi
     38 }
     39 
     40 load_rc_config $name
     41 run_rc_command "$1"
     42