summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-01-21 22:09:14 +0000
committerRoy Marples <roy@marples.name>2020-01-21 22:09:14 +0000
commitb2888271d79d39d972db7746f5d4ecdcf1372586 (patch)
treefbcd58ce9f268aa0ab1bde7d1cb7317a97a2aa6d /src/dhcpcd.c
parenta6178d6a904eff4e5fcb4cef268045e9c4e9d918 (diff)
downloaddhcpcd-b2888271d79d39d972db7746f5d4ecdcf1372586.tar.xz
Linux: setup mounts in chroot
This allows dhcpcd to work. udev sadly requires /run/udev as well, so heh ho.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index ad2249c4..f0456ce6 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -2018,6 +2018,7 @@ printpidfile:
logerr("ps_init");
goto exit_failure;
}
+ script_runchroot(&ctx, ifo->script);
#endif
#ifdef USE_SIGNALS
@@ -2091,6 +2092,12 @@ printpidfile:
goto exit_failure;
}
+ /* Start any dev listening plugin which may want to
+ * change the interface name provided by the kernel */
+ if ((ctx.options & (DHCPCD_MASTER | DHCPCD_DEV)) ==
+ (DHCPCD_MASTER | DHCPCD_DEV))
+ dev_start(&ctx);
+
#ifdef PRIVSEP
if (ctx.options & DHCPCD_PRIVSEP && ps_dropprivs(&ctx) == -1) {
logerr("ps_dropprivs");
@@ -2120,12 +2127,6 @@ printpidfile:
* routes. */
eloop_event_add(ctx.eloop, ctx.link_fd, dhcpcd_handlelink, &ctx);
- /* Start any dev listening plugin which may want to
- * change the interface name provided by the kernel */
- if ((ctx.options & (DHCPCD_MASTER | DHCPCD_DEV)) ==
- (DHCPCD_MASTER | DHCPCD_DEV))
- dev_start(&ctx);
-
ctx.ifaces = if_discover(&ctx, &ifaddrs, ctx.ifc, ctx.ifv);
if (ctx.ifaces == NULL) {
logerr("%s: if_discover", __func__);