commit: 756591785d521af36a30b5a74d58be733a94e596
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 8 14:09:33 2015 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 8 14:09:33 2015 +0000
URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=75659178
New functions: set/get/is_interface_type to persistently track type of
interfaces despite conf.d/net changes.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
init.d/net.lo.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/init.d/net.lo.in b/init.d/net.lo.in
index 2611e3e..31a45e6 100644
--- a/init.d/net.lo.in
+++ b/init.d/net.lo.in
@@ -536,6 +536,18 @@ interface_down()
{
_run_if _down "$@"
}
+set_interface_type()
+{
+ service_set_value iface_type "$@"
+}
+get_interface_type()
+{
+ ( RC_SVCNAME="net.$IFACE" service_get_value iface_type )
+}
+is_interface_type()
+{
+ [ "$(get_interface_type)" = "$1" ]
+}
start()
{