summaryrefslogtreecommitdiff
path: root/packages/modutils
diff options
context:
space:
mode:
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-06-16 17:40:11 +0000
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-06-16 17:40:11 +0000
commitdbef60af10feedfaf2be91cb250b3a8777e8af66 (patch)
tree00807f23c2121c851b5b9de6cd2e34db715bad4a /packages/modutils
parenta30791b51c9b8ab16f31883d07288e7e9eda1339 (diff)
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/06/16 19:20:15+02:00 (none)!br1 modutils.sh: also handle cases when depmod and modprobe is not installed 2005/06/16 19:19:03+02:00 (none)!br1 wrt busybox config: add run-parts, start-stop-daemon, ifup. remove telnetd 2005/06/16 19:12:23+02:00 (none)!br1 add modutils for wrt BKrev: 42b1b97bNWtJltYtYyTXoAV0eFK0nw
Diffstat (limited to 'packages/modutils')
-rw-r--r--packages/modutils/files/modutils.sh13
-rw-r--r--packages/modutils/files/wrt54/modules0
2 files changed, 9 insertions, 4 deletions
diff --git a/packages/modutils/files/modutils.sh b/packages/modutils/files/modutils.sh
index 00f989f379..89281276fd 100644
--- a/packages/modutils/files/modutils.sh
+++ b/packages/modutils/files/modutils.sh
@@ -1,11 +1,16 @@
#!/bin/sh
+LOAD_MODULE=modprobe
[ -f /proc/modules ] || exit 0
-[ -e /sbin/depmod ] || exit 0
[ -f /etc/modules ] || exit 0
+[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
-[ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
-depmod -Ae
+if [ ! -e /sbin/depmod ]; then
+ [ -f /lib/modules/`uname -r`/modules.dep ] || LOAD_MODULE=insmod
+else
+ [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
+ depmod -Ae
+fi
[ "$VERBOSE" != no ] && echo -n "Loading modules: "
(cat /etc/modules; echo; ) |
@@ -15,7 +20,7 @@ do
\#*|"") continue ;;
esac
[ "$VERBOSE" != no ] && echo -n "$module "
- modprobe $module $args >/dev/null 2>&1
+ eval "$LOAD_MODULE $module $args >/dev/null 2>&1"
done
[ "$VERBOSE" != no ] && echo
diff --git a/packages/modutils/files/wrt54/modules b/packages/modutils/files/wrt54/modules
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/modutils/files/wrt54/modules