projects
/
15.05
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86539b2
)
[package] base-files: add network_is_up()
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 29 May 2012 02:03:25 +0000
(
02:03
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 29 May 2012 02:03:25 +0000
(
02:03
+0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31978
3c298f89
-4303-0410-b956-
a3cf2f4a3e73
package/base-files/files/lib/functions/network.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/lib/functions/network.sh
b/package/base-files/files/lib/functions/network.sh
index
e038c94
..
684ba63
100644
(file)
--- a/
package/base-files/files/lib/functions/network.sh
+++ b/
package/base-files/files/lib/functions/network.sh
@@
-54,5
+54,11
@@
__network_device()
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_physdev() { __network_device "$1" "$2" device; }