From 61a59949009993a6b1d634ecbce765b37c4c2560 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 24 Sep 2018 14:20:29 +0200 Subject: [PATCH] base-files: add network_get_metric() to /lib/functions/network.sh Signed-off-by: Florian Eckert Signed-off-by: Hans Dedecker [PKG_RELEASE increase] --- package/base-files/Makefile | 2 +- package/base-files/files/lib/functions/network.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 52669444ee..ea1e4ebf57 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:=195 +PKG_RELEASE:=196 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 d7fd2dea57..4fdcb66302 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 metric of the given logical interface +# 1: destination variable +# 2: interface +network_get_metric() { __network_ifstatus "$1" "$2" ".metric"; } + # determine the layer 3 linux network device of the given logical interface # 1: destination variable # 2: interface -- 2.30.2