[PATCH] ifupdown: specify unique lease files for each interface
Christoph Gysin
christoph.gysin at gmail.com
Tue Dec 1 18:23:45 UTC 2015
If multiple interfaces are running dhclient, the lease file can get corrupted.
This specifies unique lease files per interface.
---
networking/ifupdown.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 766dfab..6c4732e 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -527,7 +527,10 @@ static const struct dhcp_client_t ext_dhcp_clients[] = {
"dhcpcd -k %iface%",
},
{ "dhclient",
- "dhclient -pf /var/run/dhclient.%iface%.pid %iface%",
+ "dhclient"
+ " -pf /var/run/dhclient.%iface%.pid"
+ " -lf /var/lib/dhcp/dhclient.%iface%.leases"
+ " %iface%",
"kill -9 `cat /var/run/dhclient.%iface%.pid` 2>/dev/null",
},
{ "pump",
--
2.6.2
More information about the busybox
mailing list