Skip to content

Commit 109861c

Browse files
committed
dhcpcd: Fix -b --background
It's been broken for a while... just the 11 years ago in 1d5d236 Initial fix for #423
1 parent 6299f1f commit 109861c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/dhcpcd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ handle_exit_timeout(void *arg)
208208
eloop_exit(ctx->eloop, EXIT_FAILURE);
209209
return;
210210
}
211-
ctx->options |= DHCPCD_NOWAITIP;
211+
212+
ctx->options |= DHCPCD_BACKGROUND;
212213
dhcpcd_daemonise(ctx);
213214
}
214215

@@ -366,7 +367,7 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx)
366367
int exit_code;
367368

368369
if (ctx->options & DHCPCD_DAEMONISE &&
369-
!(ctx->options & (DHCPCD_DAEMONISED | DHCPCD_NOWAITIP)))
370+
!(ctx->options & (DHCPCD_DAEMONISED | DHCPCD_BACKGROUND)))
370371
{
371372
if (!dhcpcd_ipwaited(ctx))
372373
return;

src/if-options.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#define DHCPCD_RTBUILD(1ULL << 2)
6464
#define DHCPCD_GATEWAY(1ULL << 3)
6565
#define DHCPCD_STATIC(1ULL << 4)
66-
//#define DHCPCD_DEBUG(1ULL << 5)
66+
// unused(1ULL << 5)
6767
#define DHCPCD_ARP_PERSISTDEFENCE(1ULL << 6)
6868
#define DHCPCD_LASTLEASE(1ULL << 7)
6969
#define DHCPCD_INFORM(1ULL << 8)
@@ -81,7 +81,7 @@
8181
#define DHCPCD_ANONYMOUS(1ULL << 21)
8282
#define DHCPCD_BACKGROUND(1ULL << 22)
8383
#define DHCPCD_VENDORRAW(1ULL << 23)
84-
#define DHCPCD_NOWAITIP(1ULL << 24) /* To force daemonise */
84+
// unused(1ULL << 24)
8585
#define DHCPCD_WAITIP(1ULL << 25)
8686
#define DHCPCD_SLAACPRIVATE(1ULL << 26)
8787
#define DHCPCD_CSR_WARNED(1ULL << 27)

0 commit comments

Comments
 (0)