2005-11-07 01:12:51 +00:00
|
|
|
#!/bin/sh
|
2006-06-27 00:36:13 +00:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2006-04-05 02:09:22 +00:00
|
|
|
|
2007-03-03 20:59:49 +00:00
|
|
|
[ -x /sbin/mdev -a -n "$ACTION" -a -n "$DEVPATH" ] && /sbin/mdev "$@"
|
2007-03-03 20:35:01 +00:00
|
|
|
|
2006-04-05 02:09:22 +00:00
|
|
|
# bypass the normal hotplug path for firmware loading
|
|
|
|
# would otherwise cause problems with drivers like bcm43xx
|
2006-01-05 01:20:44 +00:00
|
|
|
[ "$1" = "firmware" -a "$ACTION" = "add" ] && {
|
|
|
|
[ -f "/lib/firmware/$FIRMWARE" ] && {
|
|
|
|
echo 1 > "/sys$DEVPATH/loading"
|
|
|
|
cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
|
|
|
|
echo 0 > "/sys$DEVPATH/loading"
|
|
|
|
}
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2005-11-07 02:18:59 +00:00
|
|
|
. /etc/functions.sh
|
|
|
|
|
2005-11-07 01:12:51 +00:00
|
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
|
|
LOGNAME=root
|
|
|
|
USER=root
|
|
|
|
export PATH LOGNAME USER
|
|
|
|
|
|
|
|
[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
|
|
|
|
for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
|
|
|
|
[ -f $script ] && . $script
|
|
|
|
); done
|
|
|
|
}
|