summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-03-31 00:59:49 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-03-31 00:59:49 +0000
commit8e779fde4fa7e44a6f4ff82000cf468ed02b880f (patch)
tree292cb624190b75e588c8fc56af21c087431db872 /package/base-files/files/sbin
parentae2c89d0cd71a2febd4e6a82480cbc350c2893b3 (diff)
/sbin/hotplug-call: export the hotplug event type through the environment for hotplug scripts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6768 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-xpackage/base-files/files/sbin/hotplug-call4
-rwxr-xr-xpackage/base-files/files/sbin/mount_root2
2 files changed, 4 insertions, 2 deletions
diff --git a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call
index b1b6f97b2..607ee2e9d 100755
--- a/package/base-files/files/sbin/hotplug-call
+++ b/package/base-files/files/sbin/hotplug-call
@@ -1,9 +1,11 @@
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
+export HOTPLUG_TYPE="$1"
+
# bypass the normal hotplug path for firmware loading
# would otherwise cause problems with drivers like bcm43xx
-[ "$1" = "firmware" -a "$ACTION" = "add" ] && {
+[ "$HOTPLUG_TYPE" = "firmware" -a "$ACTION" = "add" ] && {
[ -f "/lib/firmware/$FIRMWARE" ] && {
echo 1 > "/sys$DEVPATH/loading"
cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
diff --git a/package/base-files/files/sbin/mount_root b/package/base-files/files/sbin/mount_root
index 47babf14f..7b89e8f3f 100755
--- a/package/base-files/files/sbin/mount_root
+++ b/package/base-files/files/sbin/mount_root
@@ -13,7 +13,7 @@ else
mknod /dev/console c 5 1
exec >/dev/console </dev/console 2>&1
mkdir /dev/shm
- /sbin/hotplug2 --no-persistent --coldplug
+ /sbin/hotplug2 --no-persistent --coldplug --max-children 3
fi
mkdir -p /dev/pts
mount none /dev/pts -t devpts