summaryrefslogtreecommitdiffstats
path: root/helper
diff options
context:
space:
mode:
authorSimon Rettberg2013-05-08 18:33:51 +0200
committerSimon Rettberg2013-05-08 18:33:51 +0200
commit09d49a9bbdd16f36505bceb276ef5fb0cd7b98c5 (patch)
tree5c9cb4f5917754c3ee9728969757e7b5b633e128 /helper
parentAdd vmplayer module (diff)
parentoopsi (diff)
downloadtm-scripts-09d49a9bbdd16f36505bceb276ef5fb0cd7b98c5.tar.gz
tm-scripts-09d49a9bbdd16f36505bceb276ef5fb0cd7b98c5.tar.xz
tm-scripts-09d49a9bbdd16f36505bceb276ef5fb0cd7b98c5.zip
Merge branch 'master' of simonslx:openslx-ng/tm-scripts
Diffstat (limited to 'helper')
-rw-r--r--helper/fileutil.inc6
-rw-r--r--helper/kernel.inc11
2 files changed, 15 insertions, 2 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc
index d37d546e..24b50a5f 100644
--- a/helper/fileutil.inc
+++ b/helper/fileutil.inc
@@ -132,7 +132,8 @@ generate_initramfs() {
[ "x${PS[1]}" != "x0" ] && perror "cpio create failed."
[ "x${PS[2]}" != "x0" ] && perror "gzip to '$3' failed."
cd - &> /dev/null
- pinfo "Created initramfs of $1 at $3. Size: $(du -bsh "$3" | awk 'END {print $1}')"
+ pinfo "Created initramfs of $1 at $3"
+ pinfo "Size: $(du -bsh "$3" | awk 'END {print $1}')"
}
# generates squashfs of directory
@@ -143,5 +144,6 @@ generate_squashfs() {
[ -d "$1" ] || perror "$1 is not a directory."
mksquashfs "$1" "$2" -comp xz -b 1M -no-recovery >&6 \
|| perror "mksquashfs failed ($?)."
- pinfo "Created squashfs of $1 at $2. Size: $(du -bsh "$2" | awk 'END {print $1}')"
+ pinfo "Created squashfs of $1 at $2"
+ pinfo "Size: $(du -bsh "$2" | awk 'END {print $1}')"
}
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