diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-04-04 12:49:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-04-04 12:49:12 +0000 |
commit | 9add79bcfc0102a60b53d43c241149bf304ebe14 (patch) | |
tree | ef2c2d04b41f2dd468e5c3b4208369909bdc62cb | |
parent | fdf6d1c8977ffaed4a97ee919ac2acc96ac5e9da (diff) |
Do not run make in /var/yp at the end of ypinit -m.
That way, you can edit the new domain Makefile before using it,
in particular to change variables like DIR and UNSECURE.
from ajacoutot@ with message tweaks and documentation updates by myself
"I like this" otto@
-rw-r--r-- | share/man/man8/yp.8 | 30 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypinit/Makefile.yp.8 | 11 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypinit/ypinit.sh | 33 |
3 files changed, 30 insertions, 44 deletions
diff --git a/share/man/man8/yp.8 b/share/man/man8/yp.8 index 54ba1b12b79..a7fd725f42b 100644 --- a/share/man/man8/yp.8 +++ b/share/man/man8/yp.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: yp.8,v 1.28 2008/10/22 20:31:20 jmc Exp $ +.\" $OpenBSD: yp.8,v 1.29 2009/04/04 12:49:11 schwarze Exp $ .\" $NetBSD: yp.8,v 1.9 1995/08/11 01:16:52 thorpej Exp $ .\" .\" Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com> @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: October 22 2008 $ +.Dd $Mdocdate: April 4 2009 $ .Dt YP 8 .Os .Sh NAME @@ -141,21 +141,19 @@ is used to initialize as a master or a slave. This creates various files in .Pa /var/yp . -By default the -.Nm YP -server will be set up in backwards compatible mode. -To enable -.Dq secure -mode, the file +After running +.Nm ypinit Fl m , +optionally edit +.Pa /var/yp/DOMAINNAME/Makefile +to change settings, for example to switch from the default +backwards compatible mode to secure mode, then run +.Xr make 1 +in +.Pa /var/yp +in any case. +See .Xr Makefile.yp 8 -must be edited. -This -.Dq secure -mode is compatible with -.Ox -and -.Fx -clients. +for details. .Pp If set up as a slave, the required databases are automatically copied from the specified server. diff --git a/usr.sbin/ypserv/ypinit/Makefile.yp.8 b/usr.sbin/ypserv/ypinit/Makefile.yp.8 index a5f11b327c5..c5c8f53a4de 100644 --- a/usr.sbin/ypserv/ypinit/Makefile.yp.8 +++ b/usr.sbin/ypserv/ypinit/Makefile.yp.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: Makefile.yp.8,v 1.1 2008/10/22 20:31:20 jmc Exp $ +.\" $OpenBSD: Makefile.yp.8,v 1.2 2009/04/04 12:49:11 schwarze Exp $ .\" .\" Copyright (c) 2008 Ingo Schwarze <schwarze@usta.de> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: October 22 2008 $ +.Dd $Mdocdate: April 4 2009 $ .Dt MAKEFILE.YP 8 .Os .Sh NAME @@ -114,6 +114,13 @@ If the variable is changed to be empty, the encrypted passwords are replaced by asterisks .Pq Ql \&* . +This +.Dq secure +mode is compatible with +.Ox +and +.Fx +clients. .It Ic netgroup Generates the .Pa netgroup , diff --git a/usr.sbin/ypserv/ypinit/ypinit.sh b/usr.sbin/ypserv/ypinit/ypinit.sh index ca53f30fe92..b36fb893bd5 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.12 2005/05/13 13:16:13 jmc Exp $ +# $Id: ypinit.sh,v 1.13 2009/04/04 12:49:10 schwarze Exp $ # # ypinit.sh - setup an master or slave server. # @@ -261,10 +261,10 @@ then echo "" if [ "${ERROR_EXISTS}" = "YES" ]; then - echo "${HOST} has been setup as an YP slave server with errors. " 1>&2 - echo "Please remember fix any problem that occurred." 1>&2 + echo "${HOST} has been set up as a YP slave server with errors. " 1>&2 + echo "Please remember to fix any problems that occurred." 1>&2 else - echo "${HOST} has been setup as an YP slave server without any errors. " + echo "${HOST} has been set up as a YP slave server without any errors. " fi echo "Don't forget to update map ypservers on ${MASTER}." @@ -373,26 +373,7 @@ if [ $? -ne 0 ]; then fi if [ "${SERVERTYPE}" = "MASTER" ]; then - CUR_PWD=`pwd` - cd ${YP_DIR}/${DOMAIN} - echo "Running ${YP_DIR}/${DOMAIN}/Makefile..." - if ! make NOPUSH=1; then - echo "" 1>&2 - echo "Error running Makefile." 1>&2 - ERROR_EXISTS="YES" - if [ "${ERROR_EXIT}" = "YES" ]; then - exit 1 - fi - fi - - cd ${CUR_PWD} - - echo "" - if [ "${ERROR_EXISTS}" = "YES" ]; then - echo "${HOST} has been setup as an YP master server with errors. " 1>&2 - echo "Please remember fix any problem that occurred." 1>&2 - else - echo "${HOST} has been setup as an YP master server without any errors. " - fi - + echo "${HOST} has been set up as a YP master server." + echo "Edit ${YP_DIR}/${DOMAIN}/Makefile to suit your needs." + echo "After that, run \`make' in ${YP_DIR}." fi |