don't run mdev on hotplug pseudo-events that come from user space
[openwrt.git] / package / base-files / files / sbin / hotplug
index b1b6f97..189cfee 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 # Copyright (C) 2006 OpenWrt.org
 
 #!/bin/sh
 # Copyright (C) 2006 OpenWrt.org
 
+[ -x /sbin/mdev -a -n "$ACTION" -a -n "$DEVPATH" ] && /sbin/mdev "$@"
+
 # bypass the normal hotplug path for firmware loading
 # would otherwise cause problems with drivers like bcm43xx
 [ "$1" = "firmware" -a "$ACTION" = "add" ] && {
 # bypass the normal hotplug path for firmware loading
 # would otherwise cause problems with drivers like bcm43xx
 [ "$1" = "firmware" -a "$ACTION" = "add" ] && {