b93bcb
diff -up ./scripts/ypMakefile.in.nonedomain ./scripts/ypMakefile.in
b93bcb
--- ./scripts/ypMakefile.in.nonedomain	2013-05-06 18:30:46.772434725 +0200
b93bcb
+++ ./scripts/ypMakefile.in	2013-05-06 18:31:59.429495323 +0200
b93bcb
@@ -106,10 +106,18 @@ NETMASKS    = $(YPSRCDIR)/netmasks
b93bcb
 YPSERVERS = $(YPDIR)/ypservers	# List of all NIS servers for a domain
b93bcb
 
b93bcb
 target: Makefile
b93bcb
+ifeq ($(shell /bin/domainname), (none))
b93bcb
+	@echo "Domain name cannot be (none)"
b93bcb
+else
b93bcb
+ifeq ($(shell /bin/domainname), )
b93bcb
+	@echo "Domain name must be set"
b93bcb
+else
b93bcb
 	@test ! -d $(LOCALDOMAIN) && mkdir $(LOCALDOMAIN) ; \
b93bcb
 	cd $(LOCALDOMAIN)  ; \
b93bcb
 	$(NOPUSH) || $(MAKE) -f ../Makefile ypservers; \
b93bcb
 	$(MAKE) -f ../Makefile all
b93bcb
+endif
b93bcb
+endif
b93bcb
 
b93bcb
 # If you don't want some of these maps built, feel free to comment
b93bcb
 # them out from this list.