rpcd: iwinfo plugin fixes
[openwrt.git] / package / base-files / files / sbin / hotplug-call
1 #!/bin/sh
2 # Copyright (C) 2006-2016 OpenWrt.org
3
4 export HOTPLUG_TYPE="$1"
5
6 . /lib/functions.sh
7
8 PATH="%PATH%"
9 LOGNAME=root
10 USER=root
11 export PATH LOGNAME USER
12 export DEVICENAME="${DEVPATH##*/}"
13
14 [ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
15         for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
16                 [ -f $script ] && . $script
17         ); done
18 }