[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.3

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

CVSweb <webmaster@jp.NetBSD.org>