From e8948e9d1bcbaa544f76ea1982db00bfb65524cf Mon Sep 17 00:00:00 2001 From: rene Date: Fri, 8 Nov 2013 09:44:24 +0000 Subject: Change KMODDDIR to /boot/modules if it is set to /boot/kernel This allows upgrading a kernel without breaking any installed kernel ports because during the upgrade /boot/kernel is renamed to /boot/kernel.old , resulting in moved files. While /boot/modules is the default, it might be overridden by bsd.own.mk to /boot/kernel before kmod is included, so setting MODULES_WITH_WORLD has no effect. --- Mk/Uses/kmod.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Mk/Uses') diff --git a/Mk/Uses/kmod.mk b/Mk/Uses/kmod.mk index bb0cc92d2e6e..372551a6acdb 100644 --- a/Mk/Uses/kmod.mk +++ b/Mk/Uses/kmod.mk @@ -23,6 +23,9 @@ CATEGORIES+= kld SSP_UNSAFE= kernel module does not support SSP +.if ${KMODDIR} == "/boot/kernel" +KMODDIR= /boot/modules +.endif KMODDIR?= /boot/modules PLIST_SUB+= KMODDIR="${KMODDIR:C,^/,,}" MAKE_ENV+= KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" -- cgit