From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 417381384B4 for ; Sun, 8 Nov 2015 14:30:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3989321C014; Sun, 8 Nov 2015 14:30:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 449B721C005 for ; Sun, 8 Nov 2015 14:30:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5BE2C340564 for ; Sun, 8 Nov 2015 14:30:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C1FDD2290 for ; Sun, 8 Nov 2015 14:30:01 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1446991773.756591785d521af36a30b5a74d58be733a94e596.robbat2@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: init.d/ X-VCS-Repository: proj/netifrc X-VCS-Files: init.d/net.lo.in X-VCS-Directories: init.d/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 756591785d521af36a30b5a74d58be733a94e596 X-VCS-Branch: master Date: Sun, 8 Nov 2015 14:30:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9221fc49-62c7-4f29-a338-4cf39f8bcd7b X-Archives-Hash: afdcba572ba9111cf12d8288f652960f commit: 756591785d521af36a30b5a74d58be733a94e596 Author: Robin H. Johnson gentoo org> AuthorDate: Sun Nov 8 14:09:33 2015 +0000 Commit: Robin H. Johnson gentoo 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 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() {