summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2001-04-21 11:14:54 +0000
committerAchim Gottinger <achim@gentoo.org>2001-04-21 11:14:54 +0000
commitd5f1cea262a531447e1c32289cc6cfec7e9b8537 (patch)
treebf9a36f42607c9845189ae429fd5cb479ac0163b /net-nds
parentReplaced configure with autoconf in pkg_unpack (diff)
downloadhistorical-d5f1cea262a531447e1c32289cc6cfec7e9b8537.tar.gz
historical-d5f1cea262a531447e1c32289cc6cfec7e9b8537.tar.bz2
historical-d5f1cea262a531447e1c32289cc6cfec7e9b8537.zip
Improved start script, added RDEPEND's
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/ypbind/files/digest-ypbind-1.7-r11
-rwxr-xr-xnet-nds/ypbind/files/ypbind49
-rw-r--r--net-nds/ypbind/ypbind-1.7-r1.ebuild33
3 files changed, 69 insertions, 14 deletions
diff --git a/net-nds/ypbind/files/digest-ypbind-1.7-r1 b/net-nds/ypbind/files/digest-ypbind-1.7-r1
new file mode 100644
index 000000000000..f94aa2fa644f
--- /dev/null
+++ b/net-nds/ypbind/files/digest-ypbind-1.7-r1
@@ -0,0 +1 @@
+MD5 d6f98266a18f25337cd6afdb8282af4f ypbind-mt-1.7.tar.gz
diff --git a/net-nds/ypbind/files/ypbind b/net-nds/ypbind/files/ypbind
index dea310acba80..c032342bf1c4 100755
--- a/net-nds/ypbind/files/ypbind
+++ b/net-nds/ypbind/files/ypbind
@@ -1,30 +1,53 @@
#!/bin/sh
-#RCUPDATE:2 3 4:75:This line is required for script management
+#RCUPDATE:3 4:72:This line is required for script management
. /etc/rc.d/config/functions
. /etc/rc.d/config/basic
-SERVICE="NIS Client"
-opts="start stop restart"
-
+SERVICE=ypbind
EXE="/usr/sbin/ypbind"
PID="/var/run/ypbind.pid"
+opts="start stop restart"
start() {
- domainname ${YP_DOMAIN}
- ebegin "Starting $SERVICE..."
- start-stop-daemon --start --quiet --exec $EXE
- eend $? "Started $SERVICE." "Error Starting $SERVICE."
+ if [ -n "$YP_DOMAIN" ]
+ then
+ ebegin "Starting ${SERVICE}"
+
+ ypdomainname "$YP_DOMAIN"
+ start-stop-daemon --start --quiet --exec $EXE 1>&2
+ if [ -n "$?" ]
+ then
+ notfound=1
+ for i in 0 1 2 3 4 5 6 7 8 9
+ do
+ ypwhich &>/dev/null && { notfound=0; break; };
+ echo -n " ."
+ sleep 1;
+ eend 0
+ done
+ if [ $notfound -eq 1 ]
+ then
+ eend 1 "No NIS server found"
+ fi
+ else
+ eend $? "Error starting ${SERVICE}."
+ fi
+ else
+ eend $? "Error starting ${SERVICE}."
+ fi
}
stop() {
- ebegin "Stopping $SERVICE..."
- start-stop-daemon --stop --quiet --signal 9 --pid $PID
- eend $? "Stopped $SERVICE." "Error Stopping $SERVICE."
-
+ if [ -n "$YP_DOMAIN" ]
+ then
+ ebegin "Stopping ${SERVICE}"
+ start-stop-daemon --stop --quiet -s 9 --pid $PID 1>&2
+ eend $? "Error stopping ${SERVICE}."
# Remove binding files, if ypbind "forget" it
rm -f /var/yp/binding/*
rm -f /var/lock/subsys/ypbind
+ fi
}
restart() {
@@ -34,5 +57,3 @@ restart() {
doservice ${@}
-
-
diff --git a/net-nds/ypbind/ypbind-1.7-r1.ebuild b/net-nds/ypbind/ypbind-1.7-r1.ebuild
new file mode 100644
index 000000000000..8680d4e874ff
--- /dev/null
+++ b/net-nds/ypbind/ypbind-1.7-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-nds/ypbind/ypbind-1.7-r1.ebuild,v 1.1 2001/04/21 11:14:54 achim Exp $
+
+A=ypbind-mt-${PV}.tar.gz
+S=${WORKDIR}/ypbind-mt-${PV}
+DESCRIPTION="Multithreaded NIS bind service"
+SRC_URI="ftp://ftp.de.kernel.org/pub/linux/utils/net/NIS/"${A}
+HOMEPAGE="http://www.suse.de/~kukuk/nis/ypbind-mt/index.html"
+
+DEPEND="virtual/glibc"
+RDEPEND="virtual/glibc net-nds/yp-tools net-nds/portmap"
+
+src_compile() {
+ try ./configure --host=${CHOST} --prefix=/usr --sysconfdir=/etc \
+ --mandir=/usr/share/man
+ try make
+}
+
+src_install() {
+ try make prefix=${D}/usr sysconfdir=${D}/etc \
+ mandir=${D}/usr/share/man install
+ exeinto /etc/rc.d/init.d
+ doexe ${FILESDIR}/ypbind
+ dodoc AUTHORS ChangeLog COPYING README THANKS TODO
+ insinto /etc
+ doins etc/yp.conf
+}
+
+
+
+