summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>1998-01-18 20:48:49 +0000
committerMats O Jansson <maja@cvs.openbsd.org>1998-01-18 20:48:49 +0000
commitedb3c62ea3e7cb7e232ec1c61804f4d4dd3c5036 (patch)
tree6207d8539b211a07c0d0bd7628a6795523cfef6a
parent20599d642889c6d7738ab57f1d643790003649d3 (diff)
Make sure ypinit asks the master server for known maps.
Bug reported by both theo and chuck cranor. -moj
-rw-r--r--usr.sbin/ypserv/ypinit/ypinit.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/ypinit/ypinit.sh b/usr.sbin/ypserv/ypinit/ypinit.sh
index 81c7851252e..61a4ef44779 100644
--- a/usr.sbin/ypserv/ypinit/ypinit.sh
+++ b/usr.sbin/ypserv/ypinit/ypinit.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: ypinit.sh,v 1.6 1997/10/09 23:41:57 deraadt Exp $
+# $Id: ypinit.sh,v 1.7 1998/01/18 20:48:48 maja Exp $
#
# ypinit.sh - setup an master or slave server.
#
@@ -108,7 +108,7 @@ fi
# Check if we have contact with master.
if [ "${SERVERTYPE}" = "SLAVE" ];
then
- COUNT=`${YPWHICH} -d ${DOMAIN} -m 2>/dev/null | grep -i ${MASTER} | wc -l | tr -d " "`
+ COUNT=`${YPWHICH} -d ${DOMAIN} -h ${MASTER} -m 2>/dev/null | grep -i ${MASTER} | wc -l | tr -d " "`
if [ "$COUNT" = "0" ]
then
echo "Can't enumerate maps from ${MASTER}. Please check that it is running." 1>&2
@@ -248,7 +248,7 @@ then
echo "There will be no further questions. The remainder of the procedure"
echo "should take a few minutes, to copy the databases from ${MASTER}."
- for MAP in `${YPWHICH} -d ${DOMAIN} -m | cut -d\ -f1`
+ for MAP in `${YPWHICH} -d ${DOMAIN} -h ${MASTER} -m | cut -d\ -f1`
do
echo "Transfering ${MAP}..."
if ! ${YPXFR} -h ${MASTER} -c -d ${DOMAIN} ${MAP}; then
@@ -398,4 +398,4 @@ if [ "${SERVERTYPE}" = "MASTER" ]; then
echo "${HOST} has been setup as an YP master server without any errors. "
fi
-fi \ No newline at end of file
+fi