?? firmware.agent
字號(hào):
#!/bin/sh## Firmware-specific hotplug policy agent.## Kernel firmware hotplug params include:## ACTION=%s [add or remove]# DEVPATH=%s [in 2.5 kernels, /sys/$DEVPATH]# FIRMWARE=%s## HISTORY:## 24-Jul-2003 Initial version of "new" hotplug agent.## $Id: firmware.agent,v 1.3 2004/03/14 15:52:56 ukai Exp $#cd /etc/hotplug. ./hotplug.functions# DEBUG=yes export DEBUG# directory of the firmware filesFIRMWARE_DIR=/lib/firmware# mountpoint of sysfsSYSFS=$(sed -n 's/^.* \([^ ]*\) sysfs .*$/\1/p' /proc/mounts)# use /proc for 2.4 kernelsif [ "$SYSFS" = "" ]; then SYSFS=/procfi## What to do with this firmware hotplug event?#case "$ACTION" inadd) if [ ! -e $SYSFS/$DEVPATH/loading ]; then sleep 1 fi if [ -f "$FIRMWARE_DIR/$FIRMWARE" ]; then echo 1 > $SYSFS/$DEVPATH/loading cp "$FIRMWARE_DIR/$FIRMWARE" $SYSFS/$DEVPATH/data echo 0 > $SYSFS/$DEVPATH/loading else echo -1 > $SYSFS/$DEVPATH/loading fi ;;remove) ;;*) mesg "Firmware '$ACTION' event not supported" exit 1 ;;esac
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -