diff --git a/client/dhclient-script.8 b/client/dhclient-script.8 index fec726c..f61bdc8 100644 --- a/client/dhclient-script.8 +++ b/client/dhclient-script.8 @@ -51,10 +51,10 @@ No standard client script exists for some operating systems, even though the actual client may work, so a pioneering user may well need to create a new script or modify an existing one. In general, customizations specific to a particular computer should be done in the -.B ETCDIR/dhclient.conf +.B /etc/dhcp/dhclient.conf file. If you find that you can't make such a customization without customizing -.B ETCDIR/dhclient.conf +.B /etc/dhcp/dhclient.conf or using the enter and exit hooks, please submit a bug report. .SH HOOKS When it starts, the client script first defines a shell function, @@ -66,53 +66,53 @@ the enter hook script. .PP On after defining the make_resolv_conf function, the client script checks for the presence of an executable -.B ETCDIR/dhclient-enter-hooks +.B /etc/dhcp/dhclient-enter-hooks script, and if present, it invokes the script inline, using the Bourne shell \'.\' command. The entire environment documented under OPERATION is available to this script, which may modify the environment if needed to change the behaviour of the script. If an error occurs during the execution of the script, it can set the exit_status variable to a nonzero value, and -.B CLIENTBINDIR/dhclient-script +.B /usr/sbin/dhclient-script will exit with that error code immediately after the client script exits. .PP After all processing has completed, -.B CLIENTBINDIR/dhclient-script +.B /usr/sbin/dhclient-script checks for the presence of an executable -.B ETCDIR/dhclient-exit-hooks +.B /etc/dhcp/dhclient-exit-hooks script, which if present is invoked using the \'.\' command. The exit status of dhclient-script will be passed to dhclient-exit-hooks in the exit_status shell variable, and will always be zero if the script succeeded at the task for which it was invoked. The rest of the environment as described previously for dhclient-enter-hooks is also present. The -.B ETCDIR/dhclient-exit-hooks +.B /etc/dhcp/dhclient-exit-hooks script can modify the valid of exit_status to change the exit status of dhclient-script. .PP Immediately after dhclient brings an interface UP with a new IP address, subnet mask, and routes, in the REBOOT/BOUND states, it will check for the existence of an executable -.B ETCDIR/dhclient-up-hooks +.B /etc/dhcp/dhclient-up-hooks script, and source it if found. This script can handle DHCP options in the environment that are not handled by default. A per-interface. -.B ETCDIR/dhclient-${IF}-up-hooks +.B /etc/dhcp/dhclient-${IF}-up-hooks script will override the generic script and be sourced when interface $IF has been brought up. .PP Immediately before dhclient brings an interface DOWN, removing its IP address, subnet mask, and routes, in the STOP/RELEASE states, it will check for the existence of an executable -.B ETCDIR/dhclient-down-hooks +.B /etc/dhcp/dhclient-down-hooks script, and source it if found. This script can handle DHCP options in the environment that are not handled by default. A per-interface -.B ETCDIR/dhclient-${IF}-down-hooks +.B /etc/dhcp/dhclient-${IF}-down-hooks script will override the generic script and be sourced when interface $IF is about to be brought down. .SH OPERATION When dhclient needs to invoke the client configuration script, it defines a set of variables in the environment, and then invokes -.B CLIENTBINDIR/dhclient-script. +.B /usr/sbin/dhclient-script. In all cases, $reason is set to the name of the reason why the script has been invoked. The following reasons are currently defined: MEDIUM, PREINIT, BOUND, RENEW, REBIND, REBOOT, EXPIRE, FAIL, STOP, RELEASE, diff --git a/client/dhclient.8 b/client/dhclient.8 index 77acb54..eae911b 100644 --- a/client/dhclient.8 +++ b/client/dhclient.8 @@ -485,14 +485,14 @@ parameter has no effect. .I Modifying default file locations: The following options can be used to modify the locations a client uses for its files. They can be particularly useful if, for example, -.B DBDIR +.B /var/lib/dhclient or -.B RUNDIR +.B /var/run have not been mounted when the DHCP client is started. .TP .BI \-cf \ config-file Path to the client configuration file. If unspecified, the default -.B ETCDIR/dhclient.conf +.B /etc/dhcp/dhclient.conf is used. See \fBdhclient.conf(5)\fR for a description of this file. .TP .BI \-df \ duid-lease-file @@ -507,12 +507,12 @@ lease file. .TP .BI \-lf \ lease-file Path to the lease database file. If unspecified, the default -.B DBDIR/dhclient.leases +.B /var/lib/dhclient/dhclient.leases is used. See \fBdhclient.leases(5)\fR for a description of this file. .TP .BI \-pf \ pid-file Path to the process ID file. If unspecified, the default -.B RUNDIR/dhclient.pid +.B /var/run/dhclient.pid is used. .TP .BI \--no-pid @@ -525,7 +525,7 @@ even if invoked with \fB-r\fR or \fB-x\fR. Path to the network configuration script invoked by .B dhclient when it gets a lease. If unspecified, the default -.B CLIENTBINDIR/dhclient-script +.B /usr/sbin/dhclient-script is used. See \fBdhclient-script(8)\fR for a description of this file. .PP .SH PORTS @@ -610,9 +610,9 @@ The dhclient PID file. The dhclient-script file. .PP .SH FILES -.B CLIENTBINDIR/dhclient-script, -.B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid, -.B DBDIR/dhclient.leases~. +.B /usr/sbin/dhclient-script, +.B /etc/dhcp/dhclient.conf, /var/lib/dhclient/dhclient.leases, /var/run/dhclient.pid, +.B /var/lib/dhclient/dhclient.leases~. .SH SEE ALSO dhcpd(8), dhcrelay(8), dhclient-script(8), dhclient.conf(5), dhclient.leases(5), dhcp-eval(5). diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5 index 258ce84..ba60859 100644 --- a/client/dhclient.conf.5 +++ b/client/dhclient.conf.5 @@ -781,7 +781,7 @@ interface "ep0" { request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; require subnet-mask, domain-name-servers; - script "CLIENTBINDIR/dhclient-script"; + script "/usr/sbin/dhclient-script"; media "media 10baseT/UTP", "media 10base2/BNC"; } diff --git a/client/dhclient.leases.5 b/client/dhclient.leases.5 index 85f2af4..59c3a4e 100644 --- a/client/dhclient.leases.5 +++ b/client/dhclient.leases.5 @@ -41,7 +41,7 @@ this is not an unusual occurrence. The format of the lease declarations is described in .B dhclient.conf(5). .SH FILES -.B DBDIR/dhclient.leases +.B /var/lib/dhclient/dhclient.leases .SH SEE ALSO dhclient(8), dhcp-options(5), dhclient.conf(5), dhcpd(8), dhcpd.conf(5), RFC2132, RFC2131. diff --git a/contrib/dhcp-lease-list.pl b/contrib/dhcp-lease-list.pl index aa6372d..3ba14a5 100644 --- a/contrib/dhcp-lease-list.pl +++ b/contrib/dhcp-lease-list.pl @@ -25,7 +25,7 @@ use strict; use warnings; use POSIX qw(strftime); -my @LEASES = ('/var/db/dhcpd.leases', '/var/lib/dhcp/dhcpd.leases', '/var/lib/dhcp3/dhcpd.leases'); +my @LEASES = ('/var/lib/dhcpd/dhcpd.leases', '/var/lib/dhcp/dhcpd.leases', '/var/lib/dhcp3/dhcpd.leases'); my @all_leases; my @leases; @@ -189,7 +189,7 @@ sub cli_processing() { " --last prints the last (even if end