From: Rosy Song Date: Tue, 16 Apr 2019 01:05:14 +0000 (+0800) Subject: ar71xx: mute script error in ar922x-led-fix script X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3b4c44aa8b8715bef8e4f4ce63c3a24f2cb22b6c;p=openwrt%2Fstaging%2Fynezz.git 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 Signed-off-by: Petr Štetiar [commit subject and message tweaks] --- 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