From: Florian Eckert Date: Fri, 28 Jun 2019 10:59:19 +0000 (+0200) Subject: base-files: add network_get_uptime() to /lib/functions/network.sh X-Git-Tag: v1.5.0-rc2~141 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f2cc0c46a6d428a26c993a4ca1700a2e8526f9c2;p=librecmc%2Flibrecmc.git base-files: add network_get_uptime() to /lib/functions/network.sh Add missing ubus api call for uptime value. Signed-off-by: Florian Eckert (cherry picked from commit 9e780ed5f7b834e06ec5c82323731917aef4ee53) --- diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 74ea2df91a..c84d2763c2 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