[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH 1/1] udhcpc: don't exit after backgrounding on -n -b
From:       Andrey <ahippo () yandex ! com>
Date:       2019-02-27 18:02:29
Message-ID: 3779661551290549 () sas1-87f9feb8d943 ! qloud-c ! yandex ! net
[Download RAW message or body]

Awesome, thank you so much for accepting it quickly!
Thank you for mirroring the fix to udhcpc6 -- I completely forgot about it.

27.02.2019, 02:32, "Denys Vlasenko" <vda.linux@googlemail.com>:
> Applied, thanks
>
> On Tue, Feb 26, 2019 at 6:41 PM Andrey <ahippo@yandex.com> wrote:
>>  26.02.2019, 11:20, "Denys Vlasenko" <vda.linux@googlemail.com>:
>>  > On Fri, Feb 22, 2019 at 10:46 PM <ahippo@yandex.com> wrote:
>>  >> From: Andrey Mazo <ahippo@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?
>>
>>  Yes, exactly.
>>
>>  An alternative solution is obviously to recompile busybox with IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b",
>>  but it may not be always feasible (like in my case).
>>
>>  Would changing the defaults for IFUPDOWN_UDHCPC_CMD_OPTIONS to "-R -b" be a reasonable thing to do?
>>  For example, yocto uses "-R -b" [1, 2].
>>  If so, I can quickly cook up the patch.
>>
>>  [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/busybox/busybox.inc#n131
>>  [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=6339
>>
>>  Thank you,
>>  Andrey.

--
Andrey.

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic