[BACK]Return to ypserv CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

Annotation of src/etc/rc.d/ypserv, Revision 1.6

1.1       lukem       1: #!/bin/sh
                      2: #
1.6     ! mycroft     3: # $NetBSD: ypserv,v 1.5 2000/09/19 13:04:39 lukem Exp $
1.1       lukem       4: #
                      5:
                      6: # PROVIDE: ypserv
1.4       fvdl        7: # REQUIRE: rpcbind
1.1       lukem       8:
1.6     ! mycroft     9: $_rc_subr_loaded . /etc/rc.subr
1.1       lukem      10:
                     11: name="ypserv"
1.5       lukem      12: rcvar=$name
1.1       lukem      13: command="/usr/sbin/${name}"
1.4       fvdl       14: required_vars="rpcbind"
1.1       lukem      15: start_precmd="ypserv_precmd"
                     16:
                     17: ypserv_precmd()
                     18: {
1.2       lukem      19:        _domain=`domainname`
                     20:        if [ -z "$_domain" ]; then
1.5       lukem      21:                warn "domainname(1) is not set."
1.1       lukem      22:                return 1
                     23:        fi
                     24:
1.2       lukem      25:        if [ ! -d /var/yp/$_domain/. ]; then
1.5       lukem      26:                warn "/var/yp/$_domain is not a directory."
1.1       lukem      27:                return 1
                     28:        fi
                     29: }
                     30:
1.3       lukem      31: load_rc_config $name
1.1       lukem      32: run_rc_command "$1"

CVSweb <webmaster@jp.NetBSD.org>