From owner-freebsd-current@FreeBSD.ORG Thu Oct 11 18:53:14 2007 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C23E16A41B for ; Thu, 11 Oct 2007 18:53:14 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id D02E113C478 for ; Thu, 11 Oct 2007 18:53:13 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.1/8.14.1) with ESMTP id l9BIrC14003481 for ; Thu, 11 Oct 2007 22:53:12 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Thu, 11 Oct 2007 22:53:12 +0400 (MSD) From: Dmitry Morozovsky To: current@FreeBSD.org Message-ID: <20071011224937.D97516@woozle.rinet.ru> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (woozle.rinet.ru [0.0.0.0]); Thu, 11 Oct 2007 22:53:12 +0400 (MSD) Cc: Subject: INSTKERNNAME= foolproof check X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2007 18:53:14 -0000 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 "--------------------------------------------------------------"