Fix logic in Makefile.i386,v 1.249: only back up ${DESTDIR}${KODIR}
to ${DESTDIR}${KODIR}.old if we have booted from ${DESTDIR}${KODIR}, and always keep kern.bootfile in a good shape.
This commit is contained in:
parent
7f1740e82a
commit
98a32cb196
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118633
@ -178,7 +178,7 @@ kernel-install:
|
||||
fi
|
||||
.if exists(${DESTDIR}${KODIR})
|
||||
-thiskernel=`sysctl -n kern.bootfile` ; \
|
||||
if [ "$$thiskernel" = ${DESTDIR}${KODIR}.old/${KERNEL_KO} ] ; then \
|
||||
if [ "`dirname "$$thiskernel"`" != ${DESTDIR}${KODIR} ] ; then \
|
||||
chflags -R noschg ${DESTDIR}${KODIR} ; \
|
||||
rm -rf ${DESTDIR}${KODIR} ; \
|
||||
else \
|
||||
@ -187,9 +187,7 @@ kernel-install:
|
||||
rm -rf ${DESTDIR}${KODIR}.old ; \
|
||||
fi ; \
|
||||
mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old ; \
|
||||
if [ "$$thiskernel" = ${DESTDIR}${KODIR}/${KERNEL_KO} ] ; then \
|
||||
sysctl kern.bootfile=${DESTDIR}${KODIR}.old/${KERNEL_KO} ; \
|
||||
fi; \
|
||||
sysctl kern.bootfile=${DESTDIR}${KODIR}.old/"`basename "$$thiskernel"`" ; \
|
||||
fi
|
||||
.endif
|
||||
mkdir -p ${DESTDIR}${KODIR}
|
||||
|
Loading…
Reference in New Issue
Block a user