base-files: Cancel firmware loading if file doesn't exist
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Thu, 1 Apr 2010 15:22:13 +0000 (15:22 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Thu, 1 Apr 2010 15:22:13 +0000 (15:22 +0000)
SVN-Revision: 20649

package/base-files/files/sbin/hotplug-call

index c5a76a76c134065ec4e1e344517de03b716f79f7..e56460de938171381c84d9780b40d75ca73b5c2d 100755 (executable)
@@ -10,7 +10,7 @@ export HOTPLUG_TYPE="$1"
                echo 1 > "/sys$DEVPATH/loading"
                dd if="/lib/firmware/$FIRMWARE" of="/sys$DEVPATH/data" bs=64k
                echo 0 > "/sys$DEVPATH/loading"
-       }
+       } || echo -1 > "/sys$DEVPATH/loading"
        exit 0
 }