11da177e4SLinus Torvalds#!/bin/sh
21da177e4SLinus Torvalds
31da177e4SLinus Torvalds# Simple hotplug script sample:
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds# Both $DEVPATH and $FIRMWARE are already provided in the environment.
61da177e4SLinus Torvalds
71da177e4SLinus TorvaldsHOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/
81da177e4SLinus Torvalds
91da177e4SLinus Torvaldsecho 1 > /sys/$DEVPATH/loading
101da177e4SLinus Torvaldscat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
111da177e4SLinus Torvaldsecho 0 > /sys/$DEVPATH/loading
121da177e4SLinus Torvalds
131da177e4SLinus Torvalds# To cancel the load in case of error:
141da177e4SLinus Torvalds#
151da177e4SLinus Torvalds#	echo -1 > /sys/$DEVPATH/loading
161da177e4SLinus Torvalds#
17