Date: Thu, 11 Oct 2007 22:53:12 +0400 (MSD) From: Dmitry Morozovsky <marck@rinet.ru> To: current@FreeBSD.org Subject: INSTKERNNAME= foolproof check Message-ID: <20071011224937.D97516@woozle.rinet.ru>
next in thread | raw e-mail | index | archive | help
Colleagues,
Today I successfully shoot myself in the foot by typing
make installkernel KERNCONF=GENERIC INSTKERNNAME=
instead of usual
make installkernel KERNCONF=GENERIC INSTKERNNAME=GENERIC
Empty INSTKERNNAME leads to wiping /boot completely - rather annoying,
especially in my case, where I had some non-trivial (and, of course, no backups
;-) loader.conf
What do you think about the following patch?
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: marck@FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------
Index: Makefile.inc1
===================================================================
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.588.2.1
diff -u -r1.588.2.1 Makefile.inc1
--- Makefile.inc1 11 Oct 2007 06:08:51 -0000 1.588.2.1
+++ Makefile.inc1 11 Oct 2007 18:49:19 -0000
@@ -742,6 +742,10 @@
@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
false
.endif
+.if empty(INSTKERNNAME)
+ @echo "ERROR: Kernel install directory is empty."; \
+ false
+.endif
@echo "--------------------------------------------------------------"
@echo ">>> Installing kernel"
@echo "--------------------------------------------------------------"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071011224937.D97516>
