From 7fc38a64521a547dd38be93bf5c792fd6beb914f 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/openwrt@2834 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/default/sbin/hotplug | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'package/base-files/default') diff --git a/package/base-files/default/sbin/hotplug b/package/base-files/default/sbin/hotplug index e53b2afcc5..3500f75201 100755 --- a/package/base-files/default/sbin/hotplug +++ b/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