Be resistant to DESTDIR being set to some unkosher value, e.g. "/".

Noticed by:	Steve Ames
This commit is contained in:
ru 2005-04-28 14:45:57 +00:00
parent 9c8b8647e1
commit 73700934eb

View File

@ -192,7 +192,7 @@ kernel-install:
fi
.if exists(${DESTDIR}${KODIR})
-thiskernel=`sysctl -n kern.bootfile` ; \
if [ "`dirname "$$thiskernel"`" != ${DESTDIR}${KODIR} ] ; then \
if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \
chflags -R noschg ${DESTDIR}${KODIR} ; \
rm -rf ${DESTDIR}${KODIR} ; \
else \