summaryrefslogtreecommitdiffstats
path: root/helper
diff options
context:
space:
mode:
authorJonathan Bauer2013-05-07 14:04:15 +0200
committerJonathan Bauer2013-05-07 14:04:15 +0200
commit5419a9b918bd5e970101fcbe563c25f8f58a4d6b (patch)
treee0c02406c6feb127d83a48e74f6154812c8e5936 /helper
parentAdd button.ko to stage 3.1 so that i915 works (diff)
downloadtm-scripts-5419a9b918bd5e970101fcbe563c25f8f58a4d6b.tar.gz
tm-scripts-5419a9b918bd5e970101fcbe563c25f8f58a4d6b.tar.xz
tm-scripts-5419a9b918bd5e970101fcbe563c25f8f58a4d6b.zip
auto copy dependencies as read from modules.dep to the target directory
Diffstat (limited to 'helper')
-rw-r--r--helper/kernel.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/helper/kernel.inc b/helper/kernel.inc
index 2482a128..6901c4b4 100644
--- a/helper/kernel.inc
+++ b/helper/kernel.inc
@@ -69,6 +69,17 @@ copy_kernel_modules() {
pwarning "Module ${KERNEL_MODULE} not found. Skipping. (might cause problems on certain clients!)"
continue
fi
+
+ # check for dependencies
+ local DEPS=$(grep "${KERNEL_MODULE}:" "${KERNEL_BUILD_DIR}/${KERNEL_MODULES_DIR}/modules.dep" | cut -d ":" -f2-)
+ if [ ! -z "$DEPS" ]; then
+ for DEP in $DEPS; do
+ pdebug "Adding dep: ${KERNEL_MODULES_DIR}/$DEP"
+ KERNEL_MODULES_LIST+=" ${KERNEL_MODULES_DIR}/$DEP"
+ done
+ else
+ pdebug "${KERNEL_MODULE} has no dependencies."
+ fi
done
if [ ! -z "${KERNEL_MODULES_LIST}" ]; then