All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pawel Wieczorkiewicz <pwieczorkiewicz-l3A5Bk7waGM@public.gmane.org>
To: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
Subject: Re: [PATCH 2/4] 40network: Fix race condition when wait for networks
Date: Tue, 2 Jun 2015 12:50:16 +0200	[thread overview]
Message-ID: <20150602125016.654a912e@linux-kf5h> (raw)
In-Reply-To: <556D823E.1090104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tue, 02 Jun 2015 12:15:26 +0200
Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

> > +            echo "[ -f /tmp/net.*.did-setup ]"
> > >$hookdir/initqueue/finished/wait-network.sh
> 
> err, if multiple networks are up, [ -f /tmp/net.*.did-setup ] is not
> correct shell syntax.
> 
> $ [ -e /dev/* ] && echo OK
> bash: [: too many arguments
> 

Can this condition really occur?
Shouldn't we be done with the wait-network initqueue job condition just
after 1st network is setup (the '*' here just means whatever interface
is up, not multiple interfaces)?

AFAIR each network ifup request is a separate initqueue job and the
condition is evaluated between jobs switches. So first
created /tmp/net.*.did-setup, whatever interface it has, makes this
condition be satisfied.

This way or another, it can be improved to the longer and more
demanding multifiles variant (for file in /tmp/net.*.did-setup loop or
set -- /tmp/net.*.did-setup and $# > 0 evaluation).

-- 
Best Regards,
Pawel Wieczorkiewicz <pwieczorkiewicz-l3A5Bk7waGM@public.gmane.org>, Linux System Developer

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu,
Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 / 90409
Nürnberg / Germany / Phone: +49-911-740 53 - 613

  parent reply	other threads:[~2015-06-02 10:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 16:12 Some tiny fixes Thomas Renninger
     [not found] ` <1427127138-12932-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2015-03-23 16:12   ` [PATCH 1/4] Correct paths for openSUSE Thomas Renninger
     [not found]     ` <1427127138-12932-2-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2015-06-02 10:25       ` Harald Hoyer
2015-03-23 16:12   ` [PATCH 2/4] 40network: Fix race condition when wait for networks Thomas Renninger
     [not found]     ` <1427127138-12932-3-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2015-06-02 10:15       ` Harald Hoyer
     [not found]         ` <556D823E.1090104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-02 10:50           ` Pawel Wieczorkiewicz [this message]
2015-03-23 16:12   ` [PATCH 3/4] 40network: always start netroot in ifup.sh Thomas Renninger
     [not found]     ` <1427127138-12932-4-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2015-06-02 10:24       ` Harald Hoyer
2015-03-23 16:12   ` [PATCH 4/4] 95fcoe-uefi: Test for EFI firmware Thomas Renninger
     [not found]     ` <1427127138-12932-5-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2015-03-26 15:38       ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
2015-06-02 10:25       ` [PATCH 4/4] 95fcoe-uefi: Test for EFI firmware Harald Hoyer

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=20150602125016.654a912e@linux-kf5h \
    --to=pwieczorkiewicz-l3a5bk7wagm@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hare-l3A5Bk7waGM@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=trenn-l3A5Bk7waGM@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.