diff options
author | ru <ru@FreeBSD.org> | 2005-04-28 14:45:57 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-04-28 14:45:57 +0000 |
commit | 73700934ebe1998a883da9c450c2d1ed47079cad (patch) | |
tree | 5534547134a2b5aed2150d275f373dda6e5e77ce /sys/conf/kern.post.mk | |
parent | 9c8b8647e1e4ce3381da63a958f16caa67eada04 (diff) | |
download | FreeBSD-src-73700934ebe1998a883da9c450c2d1ed47079cad.zip FreeBSD-src-73700934ebe1998a883da9c450c2d1ed47079cad.tar.gz |
Be resistant to DESTDIR being set to some unkosher value, e.g. "/".
Noticed by: Steve Ames
Diffstat (limited to 'sys/conf/kern.post.mk')
-rw-r--r-- | sys/conf/kern.post.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 4632b51..2706cd6 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -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 \ |