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

List:       busybox
Subject:    Re: [PATCH] dhcpd: remove hardcoded pidfile path
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2020-06-29 12:08:25
Message-ID: CAK1hOcOzMShC9++FHFrqZW8LTx-dGOmfQfAYKAun4BPvsER9Lw () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks

On Fri, Feb 14, 2020 at 10:17 PM Norbert Lange <nolange79@gmail.com> wrote:
>
> Signed-off-by: Norbert Lange <nolange79@gmail.com>
> ---
>  networking/udhcp/dhcpd.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
> index 9d6604943..6075689dc 100644
> --- a/networking/udhcp/dhcpd.c
> +++ b/networking/udhcp/dhcpd.c
> @@ -46,6 +46,12 @@
>  #include "dhcpc.h"
>  #include "dhcpd.h"
>
> +#if ENABLE_PID_FILE_PATH == 1
> +#define PID_FILE_PATH CONFIG_PID_FILE_PATH
> +#else
> +#define PID_FILE_PATH "/var/run"
> +#endif
> +
>  /* globals */
>  #define g_leases ((struct dyn_lease*)ptr_to_globals)
>  /* struct server_data_t server_data is in bb_common_bufsiz1 */
> @@ -406,7 +412,7 @@ static const struct config_keyword keywords[] = {
>         {"offer_time"   , read_u32        , OFS(offer_time   ), "60"},
>         {"min_lease"    , read_u32        , OFS(min_lease_sec), "60"},
>         {"lease_file"   , read_str        , OFS(lease_file   ), LEASES_FILE},
> -       {"pidfile"      , read_str        , OFS(pidfile      ), "/var/run/udhcpd.pid"},
> +       {"pidfile"      , read_str        , OFS(pidfile      ), PID_FILE_PATH "/udhcpd.pid"},
>         {"siaddr"       , udhcp_str2nip   , OFS(siaddr_nip   ), "0.0.0.0"},
>         /* keywords with no defaults must be last! */
>         {"option"       , read_optset     , OFS(options      ), ""},
> --
> 2.25.0
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
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