base-files: add network_get_metric() to /lib/functions/network.sh
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 24 Sep 2018 12:20:29 +0000 (14:20 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 10:28:14 +0000 (11:28 +0100)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
(backported from 61a59949009993a6b1d634ecbce765b37c4c2560)

package/base-files/Makefile
package/base-files/files/lib/functions/network.sh

index 0fdbc4002e5f996f4b4ef3cf60161d453d9baaf1..9134f118e0d0cce48df2add9da229ccb08041585 100644 (file)
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=194
+PKG_RELEASE:=194.1
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
index d7fd2dea57308721425f89d4b8c38c7b8f1ccc70..4fdcb66302a1e6588fb8d7bd6f0d3be322261c99 100644 (file)
@@ -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