All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH v2] build: add After=network-pre.target to service files
Date: Fri, 22 Jan 2021 14:18:03 -0600	[thread overview]
Message-ID: <5b0b225e-1013-1838-27ae-8a3f2801d63d@gmail.com> (raw)
In-Reply-To: <20210122144121.613727-1-alsi@bang-olufsen.dk>

[-- Attachment #1: Type: text/plain, Size: 2149 bytes --]

Hi Alvin,

On 1/22/21 8:41 AM, Alvin Šipraga wrote:
> systemd specifies a special passive target unit 'network-pre.target'
> which may be pulled in by services that want to run before any network
> interface is brought up or configured. Correspondingly, network
> management services such as iwd and ead should specify
> After=network-pre.target to ensure a proper ordering with respect to
> this special target. For more information on network-pre.target, see
> systemd.special(7).
> 
> Two examples to explain the rationale of this change:
> 
> 1. On one of our embedded systems running iwd, a oneshot service is
>     run on startup to configure - among other things - the MAC address of
>     the wireless network interface based on some data in an EEPROM.
>     Following the systemd documentation, the oneshot service specifies:
> 
>          Before=network-pre.target
>          Wants=network-pre.target
> 
>     ... to ensure that it is run before any network management software
>     starts. In practice, before this change, iwd was starting up and
>     connecting to an AP before the service had finished. iwd would then
>     get kicked off by the AP when the MAC address got changed. By
>     specifying After=network-pre.target, systemd will take care to avoid
>     this situation.
> 
> 2. An administrator may wish to use network-pre.target to ensure
>     firewall rules are applied before any network management software is
>     started. This use-case is described in the systemd documentation[1].
>     Since iwd can be used for IP configuration, it should also respect
>     the After=network-pre.target convention.
> 
> Note that network-pre.target is a passive unit that is only pulled in if
> another unit specifies e.g. Wants=network-pre.target. If no such unit
> exists, this change will have no effect on the order in which systemd
> starts iwd or ead.
> 
> [1] https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
> ---
>   src/iwd.service.in   | 1 +
>   wired/ead.service.in | 1 +
>   2 files changed, 2 insertions(+)
> 

Applied, thanks.

Regards,
-Denis

      reply	other threads:[~2021-01-22 20:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 14:41 [PATCH v2] build: add After=network-pre.target to service files Alvin =?unknown-8bit?q?=C5=A0ipraga?=
2021-01-22 20:18 ` Denis Kenzior [this message]

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=5b0b225e-1013-1838-27ae-8a3f2801d63d@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.01.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.