From dbef60af10feedfaf2be91cb250b3a8777e8af66 Mon Sep 17 00:00:00 2001 From: "nslu2-linux.adm@bkbits.net" Date: Thu, 16 Jun 2005 17:40:11 +0000 Subject: 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 --- packages/modutils/files/modutils.sh | 13 +++++++++---- packages/modutils/files/wrt54/modules | 0 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 packages/modutils/files/wrt54/modules (limited to 'packages/modutils/files') 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 -- cgit v1.2.3