hotplug-call 352 B

123456789101112131415161718
  1. #!/bin/sh
  2. # Copyright (C) 2006-2010 OpenWrt.org
  3. export HOTPLUG_TYPE="$1"
  4. . /lib/functions.sh
  5. PATH=/usr/sbin:/usr/bin:/sbin:/bin
  6. LOGNAME=root
  7. USER=root
  8. export PATH LOGNAME USER
  9. export DEVICENAME="${DEVPATH##*/}"
  10. [ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
  11. for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
  12. [ -f $script ] && . $script
  13. ); done
  14. }