Subject: bin/3004: make install of ypinit dies
To: None <gnats-bugs@gnats.netbsd.org>
From: Jason Wright <jason@Postgres95.Vnet.Net>
List: netbsd-bugs
Date: 12/07/1996 13:13:26
>Number:         3004
>Category:       bin
>Synopsis:       make install of ypinit dies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec  7 10:35:00 1996
>Last-Modified:
>Originator:     Jason Wright
>Organization:
Thought.Net
>Release:        1.2_BETA
>Environment:
	NetBSD/pmax ypinit makefile
System: NetBSD logical 1.2B NetBSD 1.2B (NEWCONF) #3: Wed Dec 4 15:26:15 PST 1996 jason@logical:/usr/src/sys/arch/pmax/compile/NEWCONF pmax


>Description:
	The build process for ypinit dies on 'make install' if /var/yp
	doesn't exist.
>How-To-Repeat:
	make build (with no /var/yp)
>Fix:
	One workaround is to create the directory, but the std rc scripts
	run the yp stuff if /var/yp exists.  (I don't run yp).

	Another solution is to create a standard directory: /var/Yp which
	would not tickle the yp stuff in the rc's, but would provide support
	for people installing yp _later_.  (Ie. they just rename the directory,
	install yp, and reboot.

	I'm enclosing a diff against a sup from 2 days ago for
	usr.sbin/ypserv/ypinit/Makefile which has these assumptions.  If
	neither /var/yp or /var/Yp exist, the makefile silently exits on
	make install.  To make this nicer, an echo of '/var/yp' does not
	exist and steps to fix it would work too.

	It's just annoying to 'make depend && make && make install' and
	have it die because of software I don't intent to use.

*** Makefile.org	Sat Dec  7 01:41:08 1996
--- Makefile	Sat Dec  7 13:02:57 1996
***************
*** 5,13 ****
--- 5,20 ----
  install:
  	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
  	    ${.CURDIR}/ypinit.sh ${DESTDIR}/usr/sbin/ypinit
+ .if exists(${DESTDIR}/var/yp)
  	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 0644 \
  	    ${.CURDIR}/Makefile.yp ${DESTDIR}/var/yp/Makefile.yp
  	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 0644 \
  	    ${.CURDIR}/Makefile.main ${DESTDIR}/var/yp/Makefile.main
+ .elif exists(${DESTDIR}/var/Yp)
+ 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 0644 \
+ 	    ${.CURDIR}/Makefile.yp ${DESTDIR}/var/Yp/Makefile.yp
+ 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 0644 \
+ 	    ${.CURDIR}/Makefile.main ${DESTDIR}/var/Yp/Makefile.main
+ .endif
  
  .include <bsd.prog.mk>
>Audit-Trail:
>Unformatted: