aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRosy Song <rosysong@rosinson.com>2019-04-16 09:05:14 +0800
committerPetr Štetiar <ynezz@true.cz>2019-05-05 21:11:01 +0200
commit3b4c44aa8b8715bef8e4f4ce63c3a24f2cb22b6c (patch)
tree264a8e611b50b582c8c4cf76f679c53cd743b3ed /target
parent51216b4f8343cbe0bd26f7665266c3cb81bac25f (diff)
downloadupstream-3b4c44aa8b8715bef8e4f4ce63c3a24f2cb22b6c.tar.gz
upstream-3b4c44aa8b8715bef8e4f4ce63c3a24f2cb22b6c.tar.bz2
upstream-3b4c44aa8b8715bef8e4f4ce63c3a24f2cb22b6c.zip
ar71xx: mute script error in ar922x-led-fix script
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]
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix b/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix
index c41d4b08f6..bd1abb9681 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix
@@ -12,6 +12,9 @@
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