2005-11-07 09:12:51 +08:00
|
|
|
#!/bin/sh
|
2010-04-04 02:21:02 +08:00
|
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
2006-04-05 10:09:22 +08:00
|
|
|
|
2007-03-31 08:59:49 +08:00
|
|
|
export HOTPLUG_TYPE="$1"
|
|
|
|
|
2012-06-06 00:04:23 +08:00
|
|
|
. /lib/functions.sh
|
2005-11-07 10:18:59 +08:00
|
|
|
|
2005-11-07 09:12:51 +08:00
|
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
|
|
LOGNAME=root
|
|
|
|
USER=root
|
|
|
|
export PATH LOGNAME USER
|
2013-11-19 08:03:39 +08:00
|
|
|
export DEVICENAME="${DEVPATH##*/}"
|
2005-11-07 09:12:51 +08:00
|
|
|
|
|
|
|
[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
|
|
|
|
for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
|
|
|
|
[ -f $script ] && . $script
|
|
|
|
); done
|
|
|
|
}
|