From 8e779fde4fa7e44a6f4ff82000cf468ed02b880f Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 31 Mar 2007 00:59:49 +0000 Subject: /sbin/hotplug-call: export the hotplug event type through the environment for hotplug scripts git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6768 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/sbin/hotplug-call | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'package/base-files/files/sbin/hotplug-call') diff --git a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call index b1b6f97b2..607ee2e9d 100755 --- a/package/base-files/files/sbin/hotplug-call +++ b/package/base-files/files/sbin/hotplug-call @@ -1,9 +1,11 @@ #!/bin/sh # Copyright (C) 2006 OpenWrt.org +export HOTPLUG_TYPE="$1" + # bypass the normal hotplug path for firmware loading # would otherwise cause problems with drivers like bcm43xx -[ "$1" = "firmware" -a "$ACTION" = "add" ] && { +[ "$HOTPLUG_TYPE" = "firmware" -a "$ACTION" = "add" ] && { [ -f "/lib/firmware/$FIRMWARE" ] && { echo 1 > "/sys$DEVPATH/loading" cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data" -- cgit v1.2.3