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