All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] dhcpcd: systemv and systemd services conflict with NetworkManager
Date: Thu, 3 May 2018 00:40:43 +0200	[thread overview]
Message-ID: <a48d7bc9-978c-9faa-eda7-83d4c66b9eab@mind.be> (raw)
In-Reply-To: <71FE4BA8-F083-4A73-A05D-262F9C28E9E2@impinj.com>



On 01-05-18 02:02, Jim Brennan wrote:
> When NetworkManager and dhcpcd packages are both enabled,
> dhcpcd services and NetworkManager both spawn dhcpcd.  This causes
> the network port to retrieve an IP address and later lose it a few
> seconds after startup.

 But then the second DHCP client also gets an IP address, so in the end all is
well, right? I'm not saying that we shouldn't fix this, just trying to
understand what's really going on.


> This patch prevents dhcpcd services from launching dhcpcd if
> NetworkManager is enabled.

 I think we need to take a step back here, and look at all the possibly
conflicting combinations...

 We currently have:

- ifupdown-scripts (installed by default if !systemd-networkd)
- systemd-networkd
- network-manager
- dhcpcd

that can possibly start a DHCP client.

 So, if we just select dhcpcd without network-manager, we actually have a
similar problem: both S40networking and S41dhcpcd will start a DHCP client.

 Bottom line: I think the start scripts should just be removed entirely. And
also, most likely the ifupdown-scripts package should depend on
!BR2_PACKAGE_NETWORK_MANAGER. Or does the problem not exist for that situation?

 Regards,
 Arnout

> 
> Signed-off-by: Jim Brennan <jbrennan@impinj.com>
> ---
>  package/dhcpcd/dhcpcd.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/dhcpcd/dhcpcd.mk b/package/dhcpcd/dhcpcd.mk
> index 92a78cd7ad..7536d71869 100644
> --- a/package/dhcpcd/dhcpcd.mk
> +++ b/package/dhcpcd/dhcpcd.mk
> @@ -36,6 +36,7 @@ define DHCPCD_INSTALL_TARGET_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
>  endef
>  
> +ifeq ($(BR2_PACKAGE_NETWORK_MANAGER),)
>  define DHCPCD_INSTALL_INIT_SYSV
>  	$(INSTALL) -m 755 -D package/dhcpcd/S41dhcpcd \
>  		$(TARGET_DIR)/etc/init.d/S41dhcpcd
> @@ -48,6 +49,7 @@ define DHCPCD_INSTALL_INIT_SYSTEMD
>  	ln -sf ../../../../usr/lib/systemd/system/dhcpcd.service \
>  		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpcd.service
>  endef
> +endif
>  
>  # NOTE: Even though this package has a configure script, it is not generated
>  # using the autotools, so we have to use the generic package infrastructure.
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2018-05-02 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01  0:02 [Buildroot] [PATCH 1/1] dhcpcd: systemv and systemd services conflict with NetworkManager Jim Brennan
2018-05-02 22:40 ` Arnout Vandecappelle [this message]
2018-05-07 18:01   ` Jim Brennan
2019-02-06 14:09 ` Thomas Petazzoni
2019-02-18 22:41   ` Peter Korsgaard

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=a48d7bc9-978c-9faa-eda7-83d4c66b9eab@mind.be \
    --to=arnout@mind.be \
    --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 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.