From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QCEZy-0000VV-Bp for garchives@archives.gentoo.org; Tue, 19 Apr 2011 17:19:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CFA721C04A; Tue, 19 Apr 2011 17:19:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9F1411C04A for ; Tue, 19 Apr 2011 17:19:01 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 24D5F1B4073 for ; Tue, 19 Apr 2011 17:19:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 36BF68014F for ; Tue, 19 Apr 2011 17:19:00 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <3035ae3158eb44e77aa0d287309857f05f8521de.robbat2@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: net/, doc/ X-VCS-Repository: proj/openrc X-VCS-Files: doc/net.example.Linux.in net/ifplugd.sh net/netplugd.sh X-VCS-Directories: net/ doc/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 3035ae3158eb44e77aa0d287309857f05f8521de Date: Tue, 19 Apr 2011 17:19:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 2103c6f360a19ae9732fa98e19caecd3 commit: 3035ae3158eb44e77aa0d287309857f05f8521de Author: Robin H. Johnson gentoo org> AuthorDate: Tue Apr 19 17:17:53 2011 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Apr 19 17:17:53 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D3035ae31 [oldnet] Bug #363959: Improve plug_timeout ifplugd/netplugd code. - Add support for a global plug_timeout setting to match the documentation. - Update the documentation to also show per-interface configuration. Signed-off-by: Robin H. Johnson gentoo.org> --- doc/net.example.Linux.in | 8 +++++--- net/ifplugd.sh | 2 ++ net/netplugd.sh | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in index 709e201..5d7c49f 100644 --- a/doc/net.example.Linux.in +++ b/doc/net.example.Linux.in @@ -975,10 +975,12 @@ # and you're done :) =20 # By default we don't wait for netplug/ifplugd to configure the interfac= e. -# If you would like it to wait so that other services know that network = is up -# then you can specify a timeout here. +# If you would like it to wait so that other services know that network = is +# up then you can specify a timeout here. A value of 0 means wait foreve= r, +# and a negative value means never wait. +#plug_timeout_eth0=3D"10" +# If you want to set it for all interfaces: #plug_timeout=3D"10" -# A value of 0 means wait forever. =20 # If you don't want to use netplug on a specific interface but you have = it # installed, you can disable it for that interface via the modules state= ment diff --git a/net/ifplugd.sh b/net/ifplugd.sh index 9f6c884..34cd18a 100644 --- a/net/ifplugd.sh +++ b/net/ifplugd.sh @@ -51,7 +51,9 @@ ifplugd_pre_start() =20 eindent =20 + # IFACE-specific, then global, then default eval timeout=3D\$plug_timeout_${IFVAR} + [ -z "${timeout}" ] && timeout=3D$plug_timeout [ -z "${timeout}" ] && timeout=3D-1 if [ ${timeout} -eq 0 ]; then ewarn "WARNING: infinite timeout set for ${IFACE} to come up" diff --git a/net/netplugd.sh b/net/netplugd.sh index 8f36ef2..23b6d9e 100644 --- a/net/netplugd.sh +++ b/net/netplugd.sh @@ -53,7 +53,9 @@ netplugd_pre_start() =20 eindent =20 + # IFACE-specific, then global, then default eval timeout=3D\$plug_timeout_${IFVAR} + [ -z "${timeout}" ] && timeout=3D$plug_timeout [ -z "${timeout}" ] && timeout=3D-1 if [ ${timeout} -eq 0 ]; then ewarn "WARNING: infinite timeout set for ${IFACE} to come up"