gwinfo: Fix IPv4/IPv6 sed (leading space in match pattern, v1.4.6)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2018-10-17 18:19:36 +02:00
parent 7e34a20451
commit 4d638c3744
2 changed files with 12 additions and 6 deletions

View File

@ -6,6 +6,9 @@
#
# designed for GATEWAY FIRMWARE
#
# v1.4.6 - 2018-10-17
# - Fix IPv4/IPv6 sed (leading space in match pattern)
#
# v1.4.3 - 2018-08-28
# - Added version to json
# - GW-Firmware: Only append IPv4/IPv6/DHCP to bat0
@ -49,7 +52,7 @@ statslink="$(uci -q get gateway.@gateway[0].statslink)"
# Code
tmp=$(/bin/mktemp)
echo "{\"version\":\"1.4\",\"hostname\":\"$hostname\",\"stats_page\":\"$statslink\",\"netifs\":[" > $tmp
echo "{\"version\":\"1.4.6\",\"hostname\":\"$hostname\",\"stats_page\":\"$statslink\",\"netifs\":[" > $tmp
comma=""
for netif in $(ls /sys/class/net); do

View File

@ -6,6 +6,9 @@
#
# designed for GATEWAY SERVER
#
# v1.4.6 - 2018-10-17
# - Fix IPv4/IPv6 sed (leading space in match pattern)
#
# v1.4.5 - 2018-08-29
# - Fix one bug regarding DHCP range processing
#
@ -54,7 +57,7 @@ dhcp=1 # 0=disabled, 1=dnsmasq, 2=isc-dhcp-server
# Code
tmp=$(/bin/mktemp)
echo "{\"version\":\"1.4\",\"hostname\":\"$hostname\",\"stats_page\":\"$statslink\",\"netifs\":[" > $tmp
echo "{\"version\":\"1.4.6\",\"hostname\":\"$hostname\",\"stats_page\":\"$statslink\",\"netifs\":[" > $tmp
comma=""
for netif in $(ls /sys/class/net); do