From f1ce518c6fc00af7490267e3fa23bddc3aa4b1fb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Feb 2015 17:07:45 +0000 Subject: [PATCH] Remove old modules before installing new ones: Avoid removing extra modules --- rpi-update | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpi-update b/rpi-update index 659e9a2..4c69d46 100755 --- a/rpi-update +++ b/rpi-update @@ -67,7 +67,8 @@ 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}") + BASEDIR=$(basename "${DIR}") + rm -rf "${FW_MODPATH}/${BASEDIR}/kernel" done cp -R "${FW_REPOLOCAL}/modules/"* "${FW_MODPATH}/" find "${FW_REPOLOCAL}/modules" -mindepth 1 -maxdepth 1 -type d | while read DIR; do