summaryrefslogtreecommitdiff
path: root/package/base-files/files/sbin/hotplug-call
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-03 11:28:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-03 11:28:02 +0000
commit8183d10d17a37e7658619495fa1bf8ee04733cee (patch)
treed9be2420f4fe4cd357a44340b6b134e385d641dc /package/base-files/files/sbin/hotplug-call
parented17f3271536c41c9d822239042b5f9f1457de4c (diff)
downloadmtk-20170518-8183d10d17a37e7658619495fa1bf8ee04733cee.zip
mtk-20170518-8183d10d17a37e7658619495fa1bf8ee04733cee.tar.gz
mtk-20170518-8183d10d17a37e7658619495fa1bf8ee04733cee.tar.bz2
check for sysfs before bypassing normal hotplug calls for firmware events (fixes #5200)
SVN-Revision: 17839
Diffstat (limited to 'package/base-files/files/sbin/hotplug-call')
-rwxr-xr-xpackage/base-files/files/sbin/hotplug-call2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call
index 57011d1..e2f7e36 100755
--- a/package/base-files/files/sbin/hotplug-call
+++ b/package/base-files/files/sbin/hotplug-call
@@ -5,7 +5,7 @@ export HOTPLUG_TYPE="$1"
# bypass the normal hotplug path for firmware loading
# would otherwise cause problems with drivers like bcm43xx
-[ "firmware" = "$HOTPLUG_TYPE" -a "add" = "$ACTION" ] && {
+[ -d /sys/firmware -a "firmware" = "$HOTPLUG_TYPE" -a "add" = "$ACTION" ] && {
[ -f "/lib/firmware/$FIRMWARE" ] && {
echo 1 > "/sys$DEVPATH/loading"
cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"