diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-11-08 06:09:33 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-11-08 06:09:33 -0800 |
commit | 756591785d521af36a30b5a74d58be733a94e596 (patch) | |
tree | f86a025c94c55a09ef5f922f1c3a025a6746f209 /init.d | |
parent | Update copyright on net.lo.in for significent gentoo changes. (diff) | |
download | netifrc-756591785d521af36a30b5a74d58be733a94e596.tar.gz netifrc-756591785d521af36a30b5a74d58be733a94e596.tar.bz2 netifrc-756591785d521af36a30b5a74d58be733a94e596.zip |
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@gentoo.org>
Diffstat (limited to 'init.d')
-rw-r--r-- | init.d/net.lo.in | 12 |
1 files changed, 12 insertions, 0 deletions
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() { |