aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/kmod.mk
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2013-11-13 03:44:50 +0800
committerrene <rene@FreeBSD.org>2013-11-13 03:44:50 +0800
commit62d1c07137d6ac867bb24957c06caba94f882aaa (patch)
tree619e6ca9693c3838d680d2fa91463f36b255a685 /Mk/Uses/kmod.mk
parent434f9184587dadf52dd53d28b9e60476764f75fa (diff)
downloadfreebsd-ports-gnome-62d1c07137d6ac867bb24957c06caba94f882aaa.tar.gz
freebsd-ports-gnome-62d1c07137d6ac867bb24957c06caba94f882aaa.tar.zst
freebsd-ports-gnome-62d1c07137d6ac867bb24957c06caba94f882aaa.zip
Do not try to remove /boot/modules, it is part of BSD.root.dist [1]
While here unquote an instance of /boot/modules. Submitted by: antoine [1]
Diffstat (limited to 'Mk/Uses/kmod.mk')
-rw-r--r--Mk/Uses/kmod.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/Mk/Uses/kmod.mk b/Mk/Uses/kmod.mk
index dff0cd51eef5..a83160dbf1f6 100644
--- a/Mk/Uses/kmod.mk
+++ b/Mk/Uses/kmod.mk
@@ -24,7 +24,7 @@ CATEGORIES+= kld
SSP_UNSAFE= kernel module does not support SSP
KMODDIR?= /boot/modules
-.if ${KMODDIR} == "/boot/kernel"
+.if ${KMODDIR} == /boot/kernel
KMODDIR= /boot/modules
.endif
PLIST_SUB+= KMODDIR="${KMODDIR:C,^/,,}"
@@ -48,6 +48,8 @@ kmod-post-install:
.if defined(NO_STAGE)
/usr/sbin/kldxref ${KMODDIR}
.endif
+.if ${KMODDIR} != /boot/modules
${ECHO_CMD} "@unexec rmdir ${KMODDIR} 2>/dev/null || true" >> ${TMPPLIST}
+.endif
.endif