From 029055c7d78d8b49a945f514e7ce38edf0850e54 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 5 Jan 2006 01:20:44 +0000 Subject: add firmware loading support to hotplug SVN-Revision: 2834 --- openwrt/package/base-files/default/sbin/hotplug | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'openwrt') diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug index e53b2af..3500f75 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.1