From 9d4298dae3e91f31b135b69d8d4de9e677fd47e5 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 20 Aug 2014 09:56:03 -0700 Subject: [PATCH] dhclient - Adjust documentation * Document how the pidfile works. * Document that executing a dhclient on an interface which already has a running dhclient will kill the old dhclient and replace it with a new instance. --- sbin/dhclient/dhclient.8 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sbin/dhclient/dhclient.8 b/sbin/dhclient/dhclient.8 index bc8c8697a0..3e9103d719 100644 --- a/sbin/dhclient/dhclient.8 +++ b/sbin/dhclient/dhclient.8 @@ -70,6 +70,10 @@ utility is used. is run on the command line with the name of the .Ar interface to be configured. +If a +.Nm +is already running for the interface, the old process will be killed and +replaced by the new invocation. .Pp The options are as follows: .Bl -tag -width "-p port" @@ -181,9 +185,17 @@ for more information. .Sh FILES .Bl -tag -width "/var/db/dhclient.leases.XXX" -compact .It Pa /etc/dhclient.conf -DHCP client configuration file +DHCP client configuration file. .It Pa /var/db/dhclient.leases. Ns Aq Ar IFNAME -database of acquired leases +Database of acquired leases. +.It Pa /var/run/dhclient..pid +Pidfile for running instance. +While active, the pidfile is flock()'d by +.Nm +which can be tested by a program using flock() or by a script +using the +.Xr lockf 1 +utility, via a non-blocking lock attempt. .El .Sh SEE ALSO .Xr bpf 4 , -- 2.41.0