Openembedded Core Discussions
 help / color / mirror / Atom feed
* removing /etc/init.d/busybox-udhcpc
@ 2012-07-26  2:40 Jesse Zhang
  2012-07-26  8:24 ` Jack Mitchell
  2012-07-27  9:03 ` [PATCH] busybox: udhcpc shouldn't be a service Jesse Zhang
  0 siblings, 2 replies; 4+ messages in thread
From: Jesse Zhang @ 2012-07-26  2:40 UTC (permalink / raw)
  To: openembedded-core, Mark Hatle

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-27  9:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26  2:40 removing /etc/init.d/busybox-udhcpc Jesse Zhang
2012-07-26  8:24 ` Jack Mitchell
2012-07-27  9:03 ` [PATCH] busybox: udhcpc shouldn't be a service Jesse Zhang
2012-07-27  9:03   ` Jesse Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox