Home | History | Annotate | Line # | Download | only in rc.d
ypserv revision 1.1
      1 #!/bin/sh
      2 #
      3 # $NetBSD: ypserv,v 1.1 2000/03/10 11:53:25 lukem Exp $
      4 #
      5 
      6 # PROVIDE: ypserv
      7 # REQUIRE: portmap
      8 
      9 . /etc/rc.subr
     10 . /etc/rc.conf
     11 
     12 name="ypserv"
     13 command="/usr/sbin/${name}"
     14 required_vars="portmap"
     15 start_precmd="ypserv_precmd"
     16 
     17 ypserv_precmd()
     18 {
     19 	if [ -z "$domainname" ]; then
     20 		warn "\$domainname is not set; ${name} not started"
     21 		return 1
     22 	fi
     23 
     24 	if [ ! -d /var/yp/$domainname/. ]; then
     25 		warn "/var/yp/$domainname is not a directory; ${name} not started"
     26 		return 1
     27 	fi
     28 }
     29 
     30 run_rc_command "$1"
     31