Add rc.d script based on NetBSD's ypbind,v 1.5.

This needs to be tested more.

Please note: I didn't add to PLIST -- the install is automated,
so the file registration should be automated too.
This commit is contained in:
Jeremy C. Reed 2004-01-27 23:46:30 +00:00 committed by Thomas Klausner
parent 19d5527a03
commit 790261d555
2 changed files with 33 additions and 1 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.1.1.1 2003/12/06 00:45:23 jeremy-c-reed Exp $
# $NetBSD: Makefile,v 1.2 2004/01/27 23:46:30 jeremy-c-reed Exp $
#
DISTNAME= ypbind-mt-1.12
PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ \
http://www.us.kernel.org/pub/linux/utils/net/NIS/ \
@ -14,10 +15,14 @@ HOMEPAGE= http://www.linux-nis.org/nis/ypbind-mt/
COMMENT= Multithreaded NIS (YP) client daemon
DEPENDS+= portmap>=4:../../wip/portmap
# rc.d script uses domainname from yp-tools or net-tools
#DEPENDS+= yp-tools-[0-9]*:../../wip/yp-tools
USE_BUILDLINK2= yes
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
USE_PKGINSTALL= yes
RCD_SCRIPTS= ypbind
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}

27
ypbind-mt/files/ypbind.sh Executable file
View file

@ -0,0 +1,27 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: ypbind.sh,v 1.1 2004/01/27 23:46:30 jeremy-c-reed Exp $
#
# PROVIDE: ypbind
# REQUIRE: ypserv
# BEFORE: DAEMON
. /etc/rc.subr
name="ypbind"
rcvar=$name
command="@PREFIX@/sbin/${name}"
start_precmd="ypbind_precmd"
ypbind_precmd()
{
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
}
load_rc_config $name
run_rc_command "$1"