hotplug 332 B

123456789101112131415
  1. #!/bin/sh
  2. #
  3. # Simple script to handle uevents
  4. #
  5. if [ "$SUBSYSTEM/$ACTION" == "firmware/add" ]; then
  6. [ -e "/sys$DEVPATH/loading" ] || exit 1
  7. DIR=/lib/firmware
  8. [ -e "$DIR/$FIRMWARE" ] || exit 1
  9. echo 1 > /sys$DEVPATH/loading
  10. cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data
  11. echo 0 > /sys$DEVPATH/loading
  12. exit 0
  13. fi