public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: net/, doc/
Date: Tue, 19 Apr 2011 17:19:00 +0000 (UTC)	[thread overview]
Message-ID: <3035ae3158eb44e77aa0d287309857f05f8521de.robbat2@gentoo> (raw)

commit:     3035ae3158eb44e77aa0d287309857f05f8521de
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 17:17:53 2011 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 17:17:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=3035ae31

[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 <robbat2 <AT> 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 :)
 
 # By default we don't wait for netplug/ifplugd to configure the interface.
-# 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 forever,
+# and a negative value means never wait.
+#plug_timeout_eth0="10"
+# If you want to set it for all interfaces:
 #plug_timeout="10"
-# A value of 0 means wait forever.
 
 # 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 statement

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()
 
 	eindent
 
+	# IFACE-specific, then global, then default
 	eval timeout=\$plug_timeout_${IFVAR}
+	[ -z "${timeout}" ] && timeout=$plug_timeout
 	[ -z "${timeout}" ] && timeout=-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()
 
 	eindent
 
+	# IFACE-specific, then global, then default
 	eval timeout=\$plug_timeout_${IFVAR}
+	[ -z "${timeout}" ] && timeout=$plug_timeout
 	[ -z "${timeout}" ] && timeout=-1
 	if [ ${timeout} -eq 0 ]; then
 		ewarn "WARNING: infinite timeout set for ${IFACE} to come up"



             reply	other threads:[~2011-04-19 17:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 17:19 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-05 23:22 [gentoo-commits] proj/openrc:master commit in: net/, doc/ William Hubbs
2012-07-20 17:20 Robin H. Johnson
2011-12-13  8:21 Robin H. Johnson
2011-12-13  4:12 William Hubbs
2011-10-26 16:31 William Hubbs
2011-04-19 17:49 Robin H. Johnson
2011-02-22  2:59 Robin H. Johnson
2011-02-21  9:44 Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3035ae3158eb44e77aa0d287309857f05f8521de.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox