This commit fixes following script error in syslog:
cat: can't open '/sys/devices/platform/ehci-platform/usb1/1-1/1-1.2/1-1.2:1.4/ieee80211/phy*/name': No such file or directory
sh: add: unknown operand
sh: add: unknown operand
Signed-off-by: Rosy Song <rosysong@rosinson.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
[commit subject and message tweaks]
devdir=$(dirname $DEVPATH)
devdir=$(dirname $devdir)
phydir=/sys$devdir/ieee80211
+
+[ -d $phydir ] || exit 0
+
phyname=$(cat $phydir/phy*/name)
[ -z $phyname -o $ACTION != "add" ] && exit 0