fix version info for packages that either lack PKG_VERSION or PKG_RELEASE
[openwrt.git] / package / base-files / default / sbin / hotplug
1 #!/bin/sh
2
3 # bypass the normal hotplug path for firmware loading
4 # would otherwise cause problems with drivers like bcm43xx
5 [ "$1" = "firmware" -a "$ACTION" = "add" ] && {
6 [ -f "/lib/firmware/$FIRMWARE" ] && {
7 echo 1 > "/sys$DEVPATH/loading"
8 cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
9 echo 0 > "/sys$DEVPATH/loading"
10 }
11 exit 0
12 }
13
14 . /etc/functions.sh
15 . /etc/config/network
16
17 PATH=/bin:/sbin:/usr/bin:/usr/sbin
18 LOGNAME=root
19 USER=root
20 export PATH LOGNAME USER
21
22 [ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
23 for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
24 [ -f $script ] && . $script
25 ); done
26 }
This page took 0.04707 seconds and 5 git commands to generate.