summaryrefslogtreecommitdiff
path: root/package/base-files/default/sbin/hotplug
blob: 4e009593af3b56c8aba1d4bc1f8c708b7562d619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
. /etc/functions.sh
. /etc/network.overrides
[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network

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
}