Commit Graph

6 Commits

Author SHA1 Message Date
Baruch Siach ce2867352d busybox: udhcpc script: suppress useless error message
Suppress the following error:

route: SIOCDELRT: No such process

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-16 09:14:34 +01:00
Baruch Siach f70de34859 busybox: udhcpc script: create resolv.conf
Eliminate the following error message on every boot:

grep: /etc/resolv.conf: No such file or directory

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-15 20:29:25 +01:00
Peter Korsgaard 584f418ec1 busybox: udhcpc.script: fix resolv.conf handling with multiple interfaces
When udhcpc is used on multiple network devices at the same time (or a mix
of dhcp and fixed configuration), /etc/resolv.conf should contain the
union of information from all the interfaces.

Currently that's not the case. The udhcpc script simply overwrites
resolv.conf with the information from the specific interface on each dhcp
bound/renew event.

Fix it by tagging lines with the interface they came from when added,
and drop the affected lines on deconfig/renew. As /etc/resolv.conf is
often a symlink to /tmp (and rootfs might be read only), special care
has to be taken when it is updated.

Notice that I'm not really aware of any official documentation requiring
that '#' comments in /etc/resolv.conf must be supported, but atleast
glibc and uClibc do.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-26 15:20:50 +02:00
Peter Korsgaard 8432d81a84 busybox: udhcpc.script: cleanup
ifconfig up is a no-op if the device is already running, so let's just
do that unconditionally.

Systems might have multiple network devices, and perhaps run udhcpc on
another interface even when booted over nfs, so don't disable the
per-interface deconfig based on the global nfsroot= setting on the kernel
command line.

If you don't want udhcpc to mess with kernel level IP autoconfiguration
(E.G. for nfs boot), you should instead ensure udhcpc/ifup/ifplugd isn't
started for that interface.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-26 14:34:25 +02:00
Peter Korsgaard 0c229f70ea busybox: use a single udhcpc script, with or without avahi-autoipd
We're currently using two different udhcpc scripts, one in the busybox
package and another in the avahi one, which calls avahi-autoipd on
dhcp failures.

The avahi one actually only does something differently from the default
if avahi-autoipd is available, so let's just always use this one instead
of the complicated logic about writing the file if not present /
overwriting it afterwards.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-26 14:22:13 +02:00
Lionel Landwerlin 274e34af3b busybox: move udhcp script from skeleton to package
Since udhcpc is part of busybox, it seems logical to move the udhcpc
script from skeleton to busybox.

[Peter: only install if not available in skeleton]
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 00:29:23 +01:00