1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 03:30:37 +02:00

[package] base-files: add network_is_up()

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31978 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-05-29 02:03:25 +00:00
parent 4fd1204c58
commit 523bb87b7e

View File

@ -54,5 +54,11 @@ __network_device()
json_get_var "$__var" "$__field" json_get_var "$__var" "$__field"
} }
network_is_up()
{
local __up
__network_device __up "$1" up && [ $__up -eq 1 ]
}
network_get_device() { __network_device "$1" "$2" l3_device; } network_get_device() { __network_device "$1" "$2" l3_device; }
network_get_physdev() { __network_device "$1" "$2" device; } network_get_physdev() { __network_device "$1" "$2" device; }