aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2018-09-24 14:20:29 +0200
committerJo-Philipp Wich <jo@mein.io>2018-12-18 11:28:14 +0100
commit0ccf009b623a149a06e678c53bd7e5c04941cb60 (patch)
treef3729f36859bf9bc6575306a034169e2eb335d63 /package
parentd5b045b52b8c13680e8d38f203ff67e4f37cd619 (diff)
downloadupstream-0ccf009b623a149a06e678c53bd7e5c04941cb60.tar.gz
upstream-0ccf009b623a149a06e678c53bd7e5c04941cb60.tar.bz2
upstream-0ccf009b623a149a06e678c53bd7e5c04941cb60.zip
base-files: add network_get_metric() to /lib/functions/network.sh
Signed-off-by: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase] (backported from 61a59949009993a6b1d634ecbce765b37c4c2560)
Diffstat (limited to 'package')
-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 0fdbc4002e..9134f118e0 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:=194
+PKG_RELEASE:=194.1
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