Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérôme Pouiller" <jezz@sysmic.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Revert "package/initscripts: S40network: wait for network interfaces to appear"
Date: Thu, 29 Oct 2015 09:51:55 +0100	[thread overview]
Message-ID: <1446108716-10399-2-git-send-email-jezz@sysmic.org> (raw)
In-Reply-To: <1446108716-10399-1-git-send-email-jezz@sysmic.org>

This reverts commit 49964858f45d2243c513e6d362e992ad89ec7a45. It is
going to be replaced with an ifup hook in next patch.

Signed-off-by: J?r?me Pouiller <jezz@sysmic.org>
---
 package/initscripts/init.d/S40network | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/package/initscripts/init.d/S40network b/package/initscripts/init.d/S40network
index a8d7c5d..7b11d8b 100755
--- a/package/initscripts/init.d/S40network
+++ b/package/initscripts/init.d/S40network
@@ -6,37 +6,8 @@
 # Debian ifupdown needs the /run/network lock directory
 mkdir -p /run/network
 
-# In case we have a slow-to-appear interface (e.g. eth-over-USB),
-# and we need to configure it, wait until it appears, but not too
-# long either. WAIT_DELAY is in seconds.
-WAIT_DELAY=15
-
-wait_for_interfaces() {
-	IFACES=$(awk '/^auto/ { print $2 }' /etc/network/interfaces)
-	[ -n "$IFACES" ] || return
-
-	printf "Waiting for network interfaces to appear"
-
-	for i in $(seq $WAIT_DELAY); do
-	    for IFACE in $IFACES; do
-		if [ ! -e "/sys/class/net/$IFACE" ]; then
-		    printf "."
-		    sleep 1
-		    continue 2
-		fi
-	    done
-
-	    printf " ok\n"; return
-	done
-
-	printf " timeout\n"
-	exit 1
-}
-
 case "$1" in
   start)
-	wait_for_interfaces
-
  	echo "Starting network..."
 	/sbin/ifup -a
 	;;
-- 
2.1.4

  reply	other threads:[~2015-10-29  8:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  8:51 [Buildroot] [PATCH 0/2] Alternative way to wait interfaces on bootup Jérôme Pouiller
2015-10-29  8:51 ` Jérôme Pouiller [this message]
2015-10-29  8:51 ` [Buildroot] [PATCH 2/2] skeleton: optionally wait for network interfaces to appear Jérôme Pouiller
2015-10-29  8:54 ` [Buildroot] [PATCH 0/2] Alternative way to wait interfaces on bootup Jérôme Pouiller

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=1446108716-10399-2-git-send-email-jezz@sysmic.org \
    --to=jezz@sysmic.org \
    --cc=buildroot@busybox.net \
    /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