File tree Expand file tree Collapse file tree 5 files changed +16
-19
lines changed
conf/rak_rak7267/files/etc Expand file tree Collapse file tree 5 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 1+ [ "$ACTION" == "add" ] || exit 0
2+ [ "$DEVTYPE" == "wlan" ] || exit 0
3+
4+ . /lib/functions.sh
5+ . /lib/functions/system.sh
6+
7+ uci set wireless.@wifi-iface[0].macaddr=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
8+ uci commit wireless
9+ wifi reload
10+
Original file line number Diff line number Diff line change @@ -6,14 +6,10 @@ if [ "$(uci -q get wireless.default_radio0.ssid)" != "OpenWrt" ]; then
66 exit 0
77fi
88
9- GWID_END=""
9+ . /lib/functions.sh
10+ . /lib/functions/system.sh
1011
11- ip link show eth0
12- if [ $? -eq 0 ]; then
13- GWID_END=$(ip link show eth0 | awk '/ether/ {print $2}' | awk -F\: '{print $4$5$6}')
14- else
15- GWID_END=$(ip link show wlan0 | awk '/ether/ {print $2}' | awk -F\: '{print $4$5$6}')
16- fi
12+ GWID_END=$(mtd_get_mac_binary factory 0x4 | awk -F\: '{print $4$5$6}')
1713
1814uci -q batch << EOI
1915set dhcp.wwan=dhcp
@@ -44,5 +40,3 @@ set firewall.@zone[0].masq='1'
4440commit firewall
4541
4642EOI
47-
48- service network restart
Original file line number Diff line number Diff line change @@ -4,5 +4,3 @@ delete network.lan.ipaddr
44delete network.lan.netmask
55delete network.lan.ip6assign
66EOI
7-
8- service network restart
Original file line number Diff line number Diff line change @@ -13,4 +13,3 @@ add_list system.led_eth_led.mode='tx'
1313add_list system.led_eth_led.mode='rx'
1414EOI
1515uci commit system
16- service led restart
Original file line number Diff line number Diff line change 1- GWID_END=""
1+ . /lib/functions.sh
2+ . /lib/functions/system.sh
23
3- ip link show eth0
4- if [ $? -eq 0 ]; then
5- GWID_END=$(ip link show eth0 | awk '/ether/ {print $2}' | awk -F\: '{print $4$5$6}')
6- else
7- GWID_END=$(ip link show wlan0 | awk '/ether/ {print $2}' | awk -F\: '{print $4$5$6}')
8- fi
4+ GWID_END=$(mtd_get_mac_binary factory 0x4 | awk -F\: '{print $4$5$6}')
95
106uci set system.@system[0].hostname="chirpstack-${GWID_END}"
117uci commit system
You can’t perform that action at this time.
0 commit comments