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

Noticed by:	Steve Ames
This commit is contained in:
Ruslan Ermilov 2005-04-28 14:45:57 +00:00
parent 4bb10cf193
commit 1afc807b33
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145623

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 \