base-files: add network_get_uptime() to /lib/functions/network.sh
[openwrt/openwrt.git] / package / base-files / files / lib / functions / network.sh
index 4fdcb66302a1e6588fb8d7bd6f0d3be322261c99..6b946b9f806b0b187d3c7c1f0325745f085c59c6 100644 (file)
@@ -271,6 +271,11 @@ network_is_up()
 # 2: interface
 network_get_protocol() { __network_ifstatus "$1" "$2" ".proto"; }
 
+# determine the uptime of the given logical interface
+# 1: destination variable
+# 2: interface
+network_get_uptime() { __network_ifstatus "$1" "$2" ".uptime"; }
+
 # determine the metric of the given logical interface
 # 1: destination variable
 # 2: interface