diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-01-05 01:20:44 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-01-05 01:20:44 +0000 |
commit | 029055c7d78d8b49a945f514e7ce38edf0850e54 (patch) | |
tree | 77ced3582a211d69b478e6bad7b3a7cb7c25187d | |
parent | d59abc2a2d15362e4a065b1aacd175609bffcfe9 (diff) | |
download | mtk-20170518-029055c7d78d8b49a945f514e7ce38edf0850e54.zip mtk-20170518-029055c7d78d8b49a945f514e7ce38edf0850e54.tar.gz mtk-20170518-029055c7d78d8b49a945f514e7ce38edf0850e54.tar.bz2 |
add firmware loading support to hotplug
SVN-Revision: 2834
-rwxr-xr-x | openwrt/package/base-files/default/sbin/hotplug | 9 |
1 files changed, 9 insertions, 0 deletions
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 } || { |