Be resistant to DESTDIR being set to some unkosher value, e.g. "/".
Noticed by: Steve Ames
This commit is contained in:
parent
4bb10cf193
commit
1afc807b33
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145623
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user