#21722: network_is_up returns incorrect status
--------------------------+---------------------------------------
Reporter: anonymous | Owner: developers
Type: defect | Status: closed
Priority: normal | Milestone: Designated Driver (Trunk)
Component: base system | Version: Trunk
Resolution: worksforme | Keywords: network.sh function
--------------------------+---------------------------------------
Changes (by jow):
* status: new => closed
* resolution: => worksforme
Comment:
You need to execute "network_flush_cache" if you already issued queries
prior to modifying the runtime state, such as taking down interfaces.
{{{
root@jj:~# . /lib/functions/network.sh
root@jj:~# network_is_up lan && echo up || echo down
up
root@jj:~# ifdown lan
root@jj:~# network_is_up lan && echo up || echo down
up
root@jj:~# network_flush_cache
root@jj:~# network_is_up lan && echo up || echo down
down
root@jj:~# ifup lan
root@jj:~# network_flush_cache
root@jj:~# network_is_up lan && echo up || echo down
up
root@jj:~#
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/21722#comment:1>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets