#! /bin/sh #---------------------------------------------------------------------------- # /sbin/hotplug - uevent helper script # # Creation: 2011-08-22 hbfl # Last update: $Id$ # # Copyright (c) 2001-2011 the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # Both $DEVPATH and $FIRMWARE are already provided in the environment. HOTPLUG_FW_DIR=/lib/firmware/ #if [ "$SUBSYSTEM" == "firmware" -a "$ACTION" == "add" ] #then if [ -f $HOTPLUG_FW_DIR/$FIRMWARE ] then echo 1 > /sys/$DEVPATH/loading cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data echo 0 > /sys/$DEVPATH/loading else echo -1 > /sys/$DEVPATH/loading fi #fi # To cancel the load in case of error: # # echo -1 > /sys/$DEVPATH/loading #