igmpproxy: do not attempt to ifstatus error messages as json
authorFelix Fietkau <nbd@openwrt.org>
Fri, 12 Dec 2014 14:52:29 +0000 (14:52 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 12 Dec 2014 14:52:29 +0000 (14:52 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43660

package/network/services/igmpproxy/files/igmpproxy.init

index dd2e430b516c006ec8367c444c606d534da36ab5..3ff8f19dadca90bcdaed34bbbd7889b728c6f991 100644 (file)
@@ -39,7 +39,10 @@ igmp_add_phyint() {
        config_get direction $1 direction
        config_get altnets $1 altnet
 
-       json_load "$(ifstatus $network)"
+       local status="$(ubus -S call "network.interface.$network" status)"
+       [ -n "$status" ] || return
+
+       json_load "$status"
        json_get_var device l3_device
        json_get_var up up