OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Hugo Almeida - 23.01.2019

FS#2078 - tty noisy from /etc/hotplug.d/net/10-ar922x-led-fix

Hi,

I think it is just a coding style issue,
but makes tty output noisy when procd debug level selected (3 or 4 for me).

noise examples:


cat: can't open '/sys/devices/virtual/ieee80211/phy*/name': No such file or directory
sh: add: unknown operand

# or

cat: can't open '/sys/devices/virtual/ieee80211/phy*/name': No such file or directory
sh: remove: unknown operand

# times depends on how many hotplug event happened

demo patch below



https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix

- phyname=$(cat $phydir/phy*/name)
+ phyname=$(cat $phydir/phy*/name 2>/dev/null)

- [ -z $phyname -o $ACTION != "add" ] && exit 0
+ [ 0 != $? -o -z "$phyname" -o "$ACTION" != "add" ] && exit 0

- [ $phyname -a $ACTION = "add" ] && {
+ [ ! -z "$phyname" -a "$ACTION" == "add" ] && {


Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing