From: Felix Fietkau <nbd@openwrt.org>
Date: Tue, 19 Nov 2013 00:03:39 +0000 (+0000)
Subject: base-files: add the DEVICENAME variable for hotplug scripts
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=69598dd0201f6a1d9ac1c2037cd6c898a8a19a35;p=openwrt%2Fstaging%2Fblocktrron.git

base-files: add the DEVICENAME variable for hotplug scripts

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38861
---

diff --git a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call
index d627becc69..260be0b7a4 100755
--- a/package/base-files/files/sbin/hotplug-call
+++ b/package/base-files/files/sbin/hotplug-call
@@ -9,6 +9,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin
 LOGNAME=root
 USER=root
 export PATH LOGNAME USER
+export DEVICENAME="${DEVPATH##*/}"
 
 [ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
 	for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (