From 3b4c44aa8b8715bef8e4f4ce63c3a24f2cb22b6c Mon Sep 17 00:00:00 2001 From: Rosy Song Date: Tue, 16 Apr 2019 09:05:14 +0800 Subject: ar71xx: mute script error in ar922x-led-fix script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Petr Štetiar [commit subject and message tweaks] --- target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'target/linux/ar71xx') 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 -- cgit v1.2.3