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