From ddef923d818225fd52576b4b9832ae57f7f0340f Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 5 Jan 2006 01:20:44 +0000 Subject: 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(+) (limited to 'openwrt/package/base-files/default/sbin/hotplug') diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug index e53b2afcc5..3500f75201 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 } || { -- cgit v1.2.3