]> git.ipfire.org Git - thirdparty/dhcpcd.git/blob - dhcpcd-run-hooks.8.in
Move dhcpcd.sh to dhcpcd-run-hooks and remove .sh suffixes
[thirdparty/dhcpcd.git] / dhcpcd-run-hooks.8.in
1 .\" Copyright 2006-2008 Roy Marples
2 .\" All rights reserved
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .Dd May 21, 2008
26 .Dt DHCPCD.SH 8 SMM
27 .Sh NAME
28 .Nm dhcpcd-run-hooks
29 .Nd DHCP client configuration script
30 .Sh DESCRIPTION
31 .Nm
32 is used by
33 .Xr dhcpcd 8
34 to run any system or user defined hook scripts.
35 System hook scripts are found in
36 .Pa @HOOKDIR@
37 and the user defined hook is
38 .Pa @SYSCONFDIR@/dhcpcd.hook .
39 The default install supplies hook scripts for configuring
40 .Pa /etc/resolv.conf
41 and the hostname.
42 Your distribution may have included other hook scripts to say configure
43 ntp or ypbind.
44 A test hook is also supplied that simply echos the dhcp variables to the
45 console from DISCOVER message.
46 .Pp
47 Each time
48 .Nm
49 is invoked,
50 .Ev $interface
51 is set to the interface that
52 .Nm dhcpcd
53 is run on and
54 .Ev $reason
55 is to the reason why
56 .Nm
57 was invoked.
58 DHCP information to be configured is held in variables starting with the word
59 new_ and old DHCP information to be removed is held in variables starting with
60 the word old_.
61 .Nm dhcpcd
62 can display the full list of variables it knows how about by using the
63 .Fl V , -variables
64 argument.
65 .Pp
66 Here's a list of reasons why
67 .Nm
68 could be invoked:
69 .Bl -tag -width indent
70 .It Dv BOUND
71 dhcpcd obtained a new lease from a DHCP server.
72 .It Dv RENEW
73 dhcpcd renewed it's lease.
74 .It Dv REBIND
75 dhcpcd has rebound to a new DHCP server.
76 .It Dv REBOOT
77 dhcpcd successfully requested a lease from a DHCP server.
78 .It Dv EXPIRE
79 dhcpcd's lease expired and it failed to obtain a new one.
80 .It Dv IPV4LL
81 dhcpcd failed to contact any DHCP servers but did obtain an IPV4LL address.
82 .It Dv FAIL
83 dhcpcd failed to contact any DHCP servers or use an old lease.
84 .It Dv TIMEOUT
85 dhcpcd failed to contact any DHCP servers but was able to use an old lease.
86 .It Dv TEST
87 dhcpcd received an OFFER from a DHCP server but will not configure the
88 interface.
89 This is primarily used to test the variables are filled correctly for the
90 script to process them.
91 .El
92 .Sh FILES
93 When
94 .Nm
95 runs, it loads
96 .Pa @SYSCONFDIR@/dhcpcd.hook
97 and any scripts found in
98 .Pa @HOOKDIR@
99 in a lexical order.
100 .Sh SEE ALSO
101 .Xr dhcpcd 8
102 .Sh AUTHORS
103 .An Roy Marples <roy@marples.name>
104 .Sh BUGS
105 Please report them to http://bugs.marples.name