apm821xx: tidy up 10-fix-wifi-mac
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 17 Aug 2020 21:09:37 +0000 (23:09 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 17 Aug 2020 21:09:37 +0000 (23:09 +0200)
This applies some cosmetic style fixes:
- remove useless echo
- remove double equal sign (specific to bash)
- add quotes for -n check

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

index 597b5dcca6b728e5379bf51418e9e5c917dd839f..a78a1054f1886d041c0ab8ad57543ca06379332e 100644 (file)
@@ -1,10 +1,10 @@
 #!/bin/ash
 
-[ "$ACTION" == "add" ] || exit 0
+[ "$ACTION" = "add" ] || exit 0
 
 PHYNBR=${DEVPATH##*/phy}
 
-[ -n $PHYNBR ] || exit 0
+[ -n "$PHYNBR" ] || exit 0
 
 . /lib/functions.sh
 . /lib/functions/system.sh
@@ -14,7 +14,7 @@ board=$(board_name)
 case "$board" in
 netgear,wndap620|\
 netgear,wndap660)
-       echo $(macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) ) > /sys${DEVPATH}/macaddress
+       macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
        ;;
 *)
        ;;