mpc85xx: tidy up 10-fix-wifi-mac
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 13 Aug 2020 18:22:30 +0000 (20:22 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 13 Aug 2020 18:29:20 +0000 (20:29 +0200)
This applies some cosmetic style fixes, mostly by removing useless
echo commands.

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

index cd829cb4717fb82e6e827bfb113ff0892add6c20..c6cede3a1f704b9a4bc16e5d2fc95b84cd5e7f88 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
@@ -13,16 +13,12 @@ board=$(board_name)
 
 case "$board" in
 enterasys,ws-ap3710i)
-       echo $(mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR}) > /sys${DEVPATH}/macaddress
+       mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
        ;;
 ocedo,panda)
-       WMAC=wmac$(($PHYNBR + 1))
-       MAC=$(mtd_get_mac_ascii uboot-env0 ${WMAC})
-       echo ${MAC} > /sys${DEVPATH}/macaddress
+       mtd_get_mac_ascii uboot-env0 wmac$(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
        ;;
 sophos,red-15w-rev1)
-       echo $(mtd_get_mac_ascii u-boot-env ethaddr) > /sys${DEVPATH}/macaddress
-       ;;
-*)
+       mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
        ;;
 esac