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