Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jesse Zhang <sen.zhang@windriver.com>
To: <openembedded-core@lists.openembedded.org>,
	Mark Hatle <mark.hatle@windriver.com>
Subject: removing /etc/init.d/busybox-udhcpc
Date: Thu, 26 Jul 2012 10:40:38 +0800	[thread overview]
Message-ID: <5010AE26.5010908@windriver.com> (raw)

Hi,

I recently found that if "ip=dhcp" is specified in the kernel cmdline,
there would be some strange behaviour of udhcpc.

1. udhcpc is started two times during bootup.

    Starting Bootlog daemon: bootlogd.
    Configuring network interfaces... udhcpc (v1.19.4) started
    Sending discover...
    Sending select for 128.224.162.132...
    Lease of 128.224.162.132 obtained, lease time 172800
    /etc/udhcpc.d/50default: Adding DNS 128.224.160.11
    /etc/udhcpc.d/50default: Adding DNS 147.11.100.30
    /etc/udhcpc.d/50default: Adding DNS 147.11.1.11
    done.
    Starting portmap daemon...
    [...]
    Starting domain name service: named.
    udhcpc (v1.19.4) started
    Sending discover...
    Sending select for 128.224.162.132...
    Lease of 128.224.162.132 obtained, lease time 172800
    RTNETLINK answers: File exists
    /etc/udhcpc.d/50default: Adding DNS 128.224.160.11
    /etc/udhcpc.d/50default: Adding DNS 147.11.100.30
    /etc/udhcpc.d/50default: Adding DNS 147.11.1.11
    creating NFS state directory: done

2. udhcpc is *started* when system is being shutdown.

    Stopping domain name service: namedrndc: neither /etc/bind/rndc.conf nor /etc/bind/rndc.key wd
    .
    udhcpc (v1.19.4) started
    Sending discover...
    Sending select for 128.224.162.132...
    Lease of 128.224.162.132 obtained, lease time 172800
    RTNETLINK answers: File exists
    /etc/udhcpc.d/50default: Adding DNS 128.224.160.11
    /etc/udhcpc.d/50default: Adding DNS 147.11.100.30
    /etc/udhcpc.d/50default: Adding DNS 147.11.1.11
    Stopping system message bus: dbus.
    stopping statd: done

The reason is busybox installs a busybox-udhcpc init script, which would
start udhcpc when "ip=dhcp" is specified, but udhcpc is also invoked by
the networking service (as specified through /etc/network/interfaces).
That's why udhcpc is started twice.

And since the init script doesn't actually support "stop" actions, it
will start udhcpc again during system shutdown.

The obvious fix is to remove the busybox-udhcpc init script; all configs
should go through /etc/network/interfaces. But I'm wondering if anyone
has problems with that.

If no one objects, I will send the patch shortly.

jesse

P.S. it only happens for non-qemu targets since they have different
configs. I used an intel emenlow.



             reply	other threads:[~2012-07-26  2:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26  2:40 Jesse Zhang [this message]
2012-07-26  8:24 ` removing /etc/init.d/busybox-udhcpc Jack Mitchell
2012-07-27  9:03 ` [PATCH] busybox: udhcpc shouldn't be a service Jesse Zhang
2012-07-27  9:03   ` Jesse Zhang

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=5010AE26.5010908@windriver.com \
    --to=sen.zhang@windriver.com \
    --cc=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox