aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/base-files/lib/preinit
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-06-05 23:54:37 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-06-05 23:54:37 +0200
commit6f648ed7e639060902df1d652fedd176f4aa9f98 (patch)
tree5203335af1cc9b13aad966a65b8d9a668c73b983 /target/linux/ipq40xx/base-files/lib/preinit
parent4a9f389ed2dcee18a5c5e1f0d4e5c406f9290579 (diff)
downloadupstream-6f648ed7e639060902df1d652fedd176f4aa9f98.tar.gz
upstream-6f648ed7e639060902df1d652fedd176f4aa9f98.tar.bz2
upstream-6f648ed7e639060902df1d652fedd176f4aa9f98.zip
treewide: remove "+" sign for increment with macaddr_add
Many people appear to use an unneeded "+" prefix for the increment when calculating a MAC address with macaddr_add. Since this is not required and used inconsistently [*], just remove it. [*] As a funny side-fact, copy-pasting has led to almost all hotplug.d files using the "+", while nearly all of the 02_network files are not using it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib/preinit')
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
index 0d606c75b5..51ba7071e7 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
@@ -4,8 +4,8 @@ preinit_set_mac_address() {
case $(board_name) in
asus,map-ac2200)
base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
- ip link set dev eth0 address $(macaddr_add "$base_mac" +1)
- ip link set dev eth1 address $(macaddr_add "$base_mac" +3)
+ ip link set dev eth0 address $(macaddr_add "$base_mac" 1)
+ ip link set dev eth1 address $(macaddr_add "$base_mac" 3)
;;
ezviz,cs-w3-wd1200g-eup)
ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6)
@@ -13,13 +13,13 @@ preinit_set_mac_address() {
;;
engenius,eap2200)
base_mac=$(cat /sys/class/net/eth0/address)
- ip link set dev eth1 address $(macaddr_add "${base_mac}" +1)
+ ip link set dev eth1 address $(macaddr_add "$base_mac" 1)
;;
linksys,ea8300|\
linksys,mr8300)
base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
- ip link set dev eth0 address "${base_mac}"
- ip link set dev eth1 address $(macaddr_add "${base_mac}" 1)
+ ip link set dev eth0 address "$base_mac"
+ ip link set dev eth1 address $(macaddr_add "$base_mac" 1)
;;
meraki,mr33)
mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66)
@@ -27,8 +27,8 @@ preinit_set_mac_address() {
;;
zyxel,nbg6617)
base_mac=$(cat /sys/class/net/eth0/address)
- ip link set dev eth0 address $(macaddr_add "$base_mac" +2)
- ip link set dev eth1 address $(macaddr_add "$base_mac" +3)
+ ip link set dev eth0 address $(macaddr_add "$base_mac" 2)
+ ip link set dev eth1 address $(macaddr_add "$base_mac" 3)
esac
}