From ddef923d818225fd52576b4b9832ae57f7f0340f Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 5 Jan 2006 01:20:44 +0000 Subject: [PATCH] add firmware loading support to hotplug git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2834 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/package/base-files/default/sbin/hotplug | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug index e53b2afcc..3500f7520 100755 --- a/openwrt/package/base-files/default/sbin/hotplug +++ b/openwrt/package/base-files/default/sbin/hotplug @@ -1,4 +1,13 @@ #!/bin/sh +[ "$1" = "firmware" -a "$ACTION" = "add" ] && { + [ -f "/lib/firmware/$FIRMWARE" ] && { + echo 1 > "/sys$DEVPATH/loading" + cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data" + echo 0 > "/sys$DEVPATH/loading" + } + exit 0 +} + [ -e /tmp/.failsafe ] && { export FAILSAFE=true } || {