cvs commit: src/sys/dev/ata ata-queue.c

M. Warner Losh imp at bsdimp.com
Thu May 12 13:33:22 PDT 2005


In message: <86wtq47j97.fsf at xps.des.no>
            des at des.no (Dag-Erling Smørgrav) writes:
: "Conrad J. Sabatier" <conrads at cox.net> writes:
: > Small problem: my last good kernel got overwritten.  Strange, but one
: > "make installkernel" did *not* move /boot/kernel to /boot/kernel.old (I
: > had previously manually moved /boot/kernel.old to /boot/kernel after
: > discovering that the new kernel wasn't working properly, then the next
: > installkernel failed to move it back to kernel.old, for some reason).
: 
: because your kern.bootfile still pointed at kernel.old.  the makefiles
: only move kernel to kernel.old if it's the currently running kernel,
: iirc.  you should always update kern.bootfile when you move or rename
: your currently running kernel, both for this reason and to get the
: module path right.

	-thiskernel=`sysctl -n kern.bootfile` ; \
	if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \
		chflags -R noschg ${DESTDIR}${KODIR} ; \
		rm -rf ${DESTDIR}${KODIR} ; \
	else \
		if [ -d ${DESTDIR}${KODIR}.old ] ; then \
			chflags -R noschg ${DESTDIR}${KODIR}.old ; \
			rm -rf ${DESTDIR}${KODIR}.old ; \
		fi ; \
		mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old ; \
		sysctl kern.bootfile=${DESTDIR}${KODIR}.old/"`basename "$$thiskernel"`" ; \
	fi

Seems that way.

Warner


More information about the cvs-src mailing list