From: Felix Fietkau Date: Thu, 5 Jan 2006 01:20:44 +0000 (+0000) Subject: add firmware loading support to hotplug X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=029055c7d78d8b49a945f514e7ce38edf0850e54;p=openwrt%2Fstaging%2Frobimarko.git add firmware loading support to hotplug SVN-Revision: 2834 --- 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 } || {