[PATCH 1/1] udhcpc: don't exit after backgrounding on -n -b
Denys Vlasenko
vda.linux at googlemail.com
Tue Feb 26 16:20:11 UTC 2019
On Fri, Feb 22, 2019 at 10:46 PM <ahippo at yandex.com> wrote:
>
> From: Andrey Mazo <ahippo at yandex.com>
>
> Currently, running "udhcpc -n -b" causes udhcpc to go to background and
> then exit after some time unless a lease is obtained.
>
> It's not very useful to do so
> as the calling process doesn't know
> if the lease was obtained or not anyway.
>
> The code actually tries to favor "-b" over "-n",
> but doesn't clear "-n" flag while clearing "-b" after backgrounding.
>
> So, clear "-n" flag after going into background.
> This effectively makes "-b" override "-n" completely
> and "-n -b" behave the same as "-b".
>
> This allows to override default "-n" option, passed to udhcpc by ifupdown,
> without recompiling busybox.
To clarify: the goal is to deal with this situation:
config IFUPDOWN_UDHCPC_CMD_OPTIONS
string "ifup udhcpc command line options"
default "-R -n"
And %udhcpc_opts% only can _add_ options, not remove -n
Thus, with default IFUPDOWN_UDHCPC_CMD_OPTIONS, -n is always passed?
This is the problem?
More information about the busybox
mailing list