From fb5babdaab21c3162de8acd7bf7a43c784009140 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Feb 2015 16:19:45 +0000 Subject: [PATCH] Remove old modules before installing new ones See: https://github.com/Hexxeh/rpi-update/issues/106 --- rpi-update | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpi-update b/rpi-update index 0276f1d..659e9a2 100755 --- a/rpi-update +++ b/rpi-update @@ -66,6 +66,9 @@ EOF function update_modules { if [[ ${SKIP_KERNEL} -eq 0 ]]; then echo " *** Updating kernel modules" + find "${FW_REPOLOCAL}/modules" -mindepth 1 -maxdepth 1 -type d | while read DIR; do + rm -rf ${FW_MODPATH}/$(basename "${DIR}") + done cp -R "${FW_REPOLOCAL}/modules/"* "${FW_MODPATH}/" find "${FW_REPOLOCAL}/modules" -mindepth 1 -maxdepth 1 -type d | while read DIR; do BASEDIR=$(basename "${DIR}")