aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-06-28 12:59:19 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:22:00 +0200
commit5a41c027e19cf8f82f38f6a3a1db83b3a4c208e3 (patch)
tree6e06a597f0f02d878b32f88f2477b320492d18d4 /package/base-files
parentf011347ad2d8800d351c6eaa1326a9633289c4c6 (diff)
downloadupstream-5a41c027e19cf8f82f38f6a3a1db83b3a4c208e3.tar.gz
upstream-5a41c027e19cf8f82f38f6a3a1db83b3a4c208e3.tar.bz2
upstream-5a41c027e19cf8f82f38f6a3a1db83b3a4c208e3.zip
base-files: add network_get_uptime() to /lib/functions/network.sh
Add missing ubus api call for uptime value. Signed-off-by: Florian Eckert <fe@dev.tdt.de> (cherry picked from commit 9e780ed5f7b834e06ec5c82323731917aef4ee53)
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/files/lib/functions/network.sh5
2 files changed, 6 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 7129d488db..e2794f9ced 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
-PKG_RELEASE:=200
+PKG_RELEASE:=201
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh
index 4fdcb66302..6b946b9f80 100644
--- a/package/base-files/files/lib/functions/network.sh
+++ b/package/base-files/files/lib/functions/network.sh
@@ -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