ath79: Code style improvements in 10_fix_wifi_mac
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 21 Jun 2019 23:53:57 +0000 (01:53 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Mon, 24 Jun 2019 22:52:35 +0000 (00:52 +0200)
This fixes one comparison and several useless echos.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index 2da2e8bfb0f58784a2b2c980e3af8c15ca739d3c..bdb8b71ff72a60b013f0235a30068750c3f73640 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/ash
 
-[ "$ACTION" == "add" ] || exit 0
+[ "$ACTION" = "add" ] || exit 0
 
 PHYNBR=${DEVPATH##*/phy}
 
@@ -17,18 +17,18 @@ case "$board" in
                # There is no eeprom data for 5 GHz wlan in "art" partition
                # which would allow to patch the macaddress
                [ "$PHYNBR" -eq 1 ] && \
-                       echo $(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1) > /sys${DEVPATH}/macaddress
+                       macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
                ;;
        iodata,wn-ac1600dgr)
                # There is no eeprom data for 5 GHz wlan in "art" partition
                # which would allow to patch the macaddress
                [ "$PHYNBR" -eq 0 ] && \
-                       echo $(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1) > /sys${DEVPATH}/macaddress
+                       macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
                ;;
        phicomm,k2t)
                # The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address
                [ "$PHYNBR" -eq 1 ] && \
-                       echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress
+                       k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress
                ;;
        *)
                ;;