From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] systemd: rework network.service installation
Date: Tue, 17 Jun 2014 00:09:07 +0200 [thread overview]
Message-ID: <20140616220907.GB29444@ned> (raw)
In-Reply-To: <20140616210616.GA572@free.fr>
Hi! On Mon, Jun 16, 2014 at 11:06:16PM +0200, Yann E. MORIN wrote:
> Eric, All,
>
> On 2014-06-16 22:52 +0200, Eric Le Bihan spake thusly:
> > The installation of the network.service file is now performed via the
> > <pkg>_INIT_SYSTEMD mechanism instead of an installation hook.
>
> Would mind also switching the other hooks over to use _INIT_SYSTEMD while
> you are at it? ;-)
I thought _INIT_SYSTEMD was for installing services only, as was _INIT_SYSV,
so IMHO only SYSTEMD_INSTALL_TTY_HOOK could be converted to
SYSTEMD_INSTALL_SERVICE_TTY. The other installation hooks are real clean up
operations, not services.
> > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> > ---
> > package/systemd/systemd.mk | 23 +++++++++++------------
> > 1 file changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> > index f3874db..97fa61a 100644
> > --- a/package/systemd/systemd.mk
> > +++ b/package/systemd/systemd.mk
> > @@ -101,6 +101,13 @@ ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
> > SYSTEMD_CONF_OPT += --enable-networkd
> > else
> > SYSTEMD_CONF_OPT += --disable-networkd
> > +define SYSTEMD_INSTALL_SERVICE_NETWORK
> > + $(INSTALL) -D -m 644 package/systemd/network.service \
> > + $(TARGET_DIR)/etc/systemd/system/network.service
> > + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
> > + ln -fs ../network.service \
> > + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service
> > +endef
>
> So, if networkd is disabled, you still install the network units?
>
> Should that block not go in the non-else part of the condition instead?
No, because systemd-networkd and network.service are mutually exclusive
solutions for managing the network.
When systemd is compiled with systemd-networkd support, another service
(systemd-networkd.service, of course) is installed and enabled. This is a
recent addition to systemd (v212).
The patch provided by Ivan dates from v44 and provides an alternative to
systemd-networkd, based on ifupdown (as /etc/init.d/S40network).
If systemd-networkd is selected, I chose not to install network.service to
avoid confusing the end user, who will have only one way to manage the
network.
Perhaps I should also make BR2_PACKAGE_SYSTEMD_NETWORKD depends on
!BR2_PACKAGE_NETWORK_MANAGER as systemd-networkd and NetworKManager both
manages the network. But they do not play in the same category, and it looks
like the developpers of NetworKManager are trying to make them coexist in
peace [1].
Best regards,
ELB
[1] https://www.mail-archive.com/systemd-devel at lists.freedesktop.org/msg18419.html
prev parent reply other threads:[~2014-06-16 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 20:52 [Buildroot] [PATCH 1/1] systemd: rework network.service installation Eric Le Bihan
2014-06-16 21:06 ` Yann E. MORIN
2014-06-16 22:09 ` Eric Le Bihan [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=20140616220907.GB29444@ned \
--to=eric.le.bihan.dev@free.fr \
--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