summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaja <maja@openbsd.org>1998-01-18 20:48:48 +0000
committermaja <maja@openbsd.org>1998-01-18 20:48:48 +0000
commitc72a7ad897481dd5a75b054f1dc6e9033469ba0e (patch)
tree5af9e07dc29685d993ce1c44453c00b68671dc12
parentAllow "set vj" for changing the default number of slots (diff)
downloadwireguard-openbsd-c72a7ad897481dd5a75b054f1dc6e9033469ba0e.tar.xz
wireguard-openbsd-c72a7ad897481dd5a75b054f1dc6e9033469ba0e.zip
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