dhclient-script.8 (9a7feaa13c6948185109d6dad8d123c55d90caa2) | dhclient-script.8 (5172455266318054c7666c29b9b6a043208341c1) |
---|---|
1.\" $OpenBSD: dhclient-script.8,v 1.2 2004/04/09 18:30:15 jmc Exp $ 2.\" 3.\" Copyright (c) 1997 The Internet Software Consortium. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 24 unchanged lines hidden (view full) --- 33.\" This software has been written for the Internet Software Consortium 34.\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie 35.\" Enterprises. To learn more about the Internet Software Consortium, 36.\" see ``http://www.isc.org/isc''. To learn more about Vixie 37.\" Enterprises, see ``http://www.vix.com''. 38.\" 39.\" $FreeBSD$ 40.\" | 1.\" $OpenBSD: dhclient-script.8,v 1.2 2004/04/09 18:30:15 jmc Exp $ 2.\" 3.\" Copyright (c) 1997 The Internet Software Consortium. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 24 unchanged lines hidden (view full) --- 33.\" This software has been written for the Internet Software Consortium 34.\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie 35.\" Enterprises. To learn more about the Internet Software Consortium, 36.\" see ``http://www.isc.org/isc''. To learn more about Vixie 37.\" Enterprises, see ``http://www.vix.com''. 38.\" 39.\" $FreeBSD$ 40.\" |
41.Dd January 1, 1997 | 41.Dd September 6, 2010 |
42.Dt DHCLIENT-SCRIPT 8 43.Os 44.Sh NAME 45.Nm dhclient-script 46.Nd DHCP client network configuration script 47.Sh DESCRIPTION 48The DHCP client network configuration script is invoked from time to 49time by --- 163 unchanged lines hidden (view full) --- 213However, an old lease has been identified, and its parameters have 214been passed in as with 215.Li BOUND . 216The client configuration script should test these parameters and, 217if it has reason to believe they are valid, should exit with a value of zero. 218If not, it should exit with a nonzero value. 219.El 220.Pp | 42.Dt DHCLIENT-SCRIPT 8 43.Os 44.Sh NAME 45.Nm dhclient-script 46.Nd DHCP client network configuration script 47.Sh DESCRIPTION 48The DHCP client network configuration script is invoked from time to 49time by --- 163 unchanged lines hidden (view full) --- 213However, an old lease has been identified, and its parameters have 214been passed in as with 215.Li BOUND . 216The client configuration script should test these parameters and, 217if it has reason to believe they are valid, should exit with a value of zero. 218If not, it should exit with a nonzero value. 219.El 220.Pp |
221Before taking action according to 222.Va $reason , 223.Nm 224will check for the existence of 225.Pa /etc/dhclient-enter-hooks . 226If found, it will be sourced 227.Pq see Xr sh 1 . 228After taking action according to 229.Va $reason , 230.Nm 231will check for the existence of 232.Pa /etc/dhclient-exit-hooks . 233If found, it will be sourced 234.Pq see Xr sh 1 . 235These hooks scripts can be used to dynamically modify the enviornment at 236appropriate times during the DHCP negotiations. 237For example, if the administrator wishes to disable alias IP numbers on 238the DHCP interface, they might want to put the following in 239.Pa /etc/dhclient-enter-hooks : 240.Bd -literal -offset indent 241[ ."$reason" = .PREINIT ] && ifconfig $interface 0.0.0.0 242.Ed 243.Pp |
|
221The usual way to test a lease is to set up the network as with 222.Li REBIND 223(since this may be called to test more than one lease) and then ping 224the first router defined in 225.Va $routers . 226If a response is received, the lease must be valid for the network to 227which the interface is currently connected. 228It would be more complete to try to ping all of the routers listed in --- 5 unchanged lines hidden (view full) --- 234.\" Each operating system should generally have its own script file, 235.\" although the script files for similar operating systems may be similar 236.\" or even identical. 237.\" The script files included in the Internet Software Consortium DHCP 238.\" distribution appear in the distribution tree under client/scripts, 239.\" and bear the names of the operating systems on which they are intended 240.\" to work. 241.Sh SEE ALSO | 244The usual way to test a lease is to set up the network as with 245.Li REBIND 246(since this may be called to test more than one lease) and then ping 247the first router defined in 248.Va $routers . 249If a response is received, the lease must be valid for the network to 250which the interface is currently connected. 251It would be more complete to try to ping all of the routers listed in --- 5 unchanged lines hidden (view full) --- 257.\" Each operating system should generally have its own script file, 258.\" although the script files for similar operating systems may be similar 259.\" or even identical. 260.\" The script files included in the Internet Software Consortium DHCP 261.\" distribution appear in the distribution tree under client/scripts, 262.\" and bear the names of the operating systems on which they are intended 263.\" to work. 264.Sh SEE ALSO |
265.Xr sh 1 , |
|
242.Xr dhclient.conf 5 , 243.Xr dhclient.leases 5 , 244.Xr dhclient 8 , 245.Xr dhcpd 8 , 246.Xr dhcrelay 8 247.Sh AUTHORS 248.An -nosplit 249The original version of --- 24 unchanged lines hidden --- | 266.Xr dhclient.conf 5 , 267.Xr dhclient.leases 5 , 268.Xr dhclient 8 , 269.Xr dhcpd 8 , 270.Xr dhcrelay 8 271.Sh AUTHORS 272.An -nosplit 273The original version of --- 24 unchanged lines hidden --- |