summaryrefslogtreecommitdiff
path: root/scripts/make-module-ipkgs.sh
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-20 22:18:11 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-20 22:19:19 +0100
commit7f58f90b8f6ba4ec94ea92769e966dfc5ad95137 (patch)
treedb9e291b0a984d19b8dbd4cc3a8cbd7a414bd916 /scripts/make-module-ipkgs.sh
parentaaa8063368367c7a63064c139617fb7f2264e55f (diff)
use strings instead of modinfo for a portable way
Idea from Phil to have a portable method to find the kernel module dependencies. make-module-ipkgs.sh uses associative arrays, so check for bash version 4.
Diffstat (limited to 'scripts/make-module-ipkgs.sh')
-rw-r--r--scripts/make-module-ipkgs.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/make-module-ipkgs.sh b/scripts/make-module-ipkgs.sh
index aeef76f10..e50340c0a 100644
--- a/scripts/make-module-ipkgs.sh
+++ b/scripts/make-module-ipkgs.sh
@@ -28,6 +28,7 @@ BUILD_DIR="$3"
PKG_BUILD="$4"
PACKAGE_DIR="$5"
+# declare associative arrays
declare -A modpaths moddeps modlevels
# recursively find a level for given module which is high enough so all
@@ -48,7 +49,7 @@ pkgname() { # (modname)
for modpath in $(find ${BUILD_DIR}/modules -name \*.ko | xargs); do
modname="$(basename $modpath .ko)"
- moddep="$(modinfo $modpath | awk '/^depends:/{print $2}' | sed 's/,/ /g')"
+ moddep="$(strings $modpath | awk -F= '/^depends=/{print $2}' | sed 's/,/ /g')"
modpaths[$modname]="$modpath"
moddeps[$modname]="$moddep"
done