summaryrefslogtreecommitdiff
path: root/openwrt/package/base-files/default/sbin/hotplug
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-11-07 01:12:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-11-07 01:12:51 +0000
commit2e8e51060ffcc46bb1308d7eae4d2bc3456deacf (patch)
treec82e5b250e3389ec4e4fe8ef16361eae61572845 /openwrt/package/base-files/default/sbin/hotplug
parent14a88822fd3f6883af5b4d66f584a3254202fd29 (diff)
downloadmtk-20170518-2e8e51060ffcc46bb1308d7eae4d2bc3456deacf.zip
mtk-20170518-2e8e51060ffcc46bb1308d7eae4d2bc3456deacf.tar.gz
mtk-20170518-2e8e51060ffcc46bb1308d7eae4d2bc3456deacf.tar.bz2
add hotplug stuff to trunk/
SVN-Revision: 2364
Diffstat (limited to 'openwrt/package/base-files/default/sbin/hotplug')
-rwxr-xr-xopenwrt/package/base-files/default/sbin/hotplug11
1 files changed, 11 insertions, 0 deletions
diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug
new file mode 100755
index 0000000..57ee969
--- /dev/null
+++ b/openwrt/package/base-files/default/sbin/hotplug
@@ -0,0 +1,11 @@
+#!/bin/sh
+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
+}