From: Roy Marples Date: Wed, 21 May 2008 09:16:24 +0000 (+0000) Subject: Improve documentation about the hooks. X-Git-Tag: v4.0.2~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb44c154542784bcfb055f4b838fcb8facca50f8;p=thirdparty%2Fdhcpcd.git Improve documentation about the hooks. --- diff --git a/dhcpcd.8.in b/dhcpcd.8.in index cd93b3b7..ea3d6fac 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 20, 2008 +.Dd May 21, 2008 .Dt DHCPCD 8 SMM .Sh NAME .Nm dhcpcd @@ -103,15 +103,25 @@ can use the option. .Ss Hooking into DHCP events .Nm -will run @SCRIPT@, or the script specified by the +will run +.Pa @SCRIPT@ , +or the script specified by the .Fl c , -script -option. This script will configure -.Pa /etc/resolv.conf -and the -.Xr hostname 3 -if possible. You can customize its behaviour through hook scripts. See +option. +This script will run each script found in +.Pa @HOOKDIR@ +in a lexical order. +The default installation supplies the scripts +.Pa test , +.Pa resolv.conf +and +.Pa hostname . +You can disable each script by using the +.Fl C , -nohook +option. +See .Xr dhcpcd.sh 8 -for more details. +for details on how these scripts work. .Nm currently ignores the exit code of the script. .Ss Fine tuning @@ -276,6 +286,9 @@ Don't set any default routes. Don't run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .Pa .sh . +.Pp +So to stop dhcpcd from touching your DNS settings you would do:- +.D1 dhcpcd -C resolv.conf .It Fl L , -noipv4ll Don't use IPv4LL at all. .It Fl O , -nooption Ar option @@ -302,10 +315,15 @@ Linux Socket Filter, or LPF device on Linux based systems. .It Pa @SYSCONFDIR@/dhcpcd.conf Configuration file for dhcpcd. If you always use the same options, put them here. -.It Pa @SCRIPT@ -Bourne shell script that is run when we configure or deconfigure an interface. .It Pa @SYSCONFDIR@/dhcpcd.duid Text file that holds the DUID used to identify the host. +.It Pa @SCRIPT@ +Bourne shell script that is run when we configure or deconfigure an interface. +.It Pa @HOOKDIR@ +A directory containing bourne shell scripts that are run by the above script. +Each script can be disabled by using the +.Fl C , -nohook +option described above. .It Pa @DBDIR@/dhcpcd\- Ns Ar interface Ns .lease The actual DHCP message send by the server. We use this when reading the last lease and use the files mtime as when it was issued. diff --git a/dhcpcd.sh.8.in b/dhcpcd.sh.8.in index 1b4406a1..903f0c4d 100644 --- a/dhcpcd.sh.8.in +++ b/dhcpcd.sh.8.in @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 20, 2008 +.Dd May 21, 2008 .Dt DHCPCD.SH 8 SMM .Sh NAME .Nm dhcpcd.sh @@ -31,9 +31,19 @@ .Nm is used by .Xr dhcpcd 8 -to run any system or user defined hook scripts, which include configuring +to run any system or user defined hook scripts. +System hook scripts are found in +.Pa @HOOKDIR@ +and the user defined hook is +.Pa @SYSCONFDIR@/dhcpcd.hook . +The default install supplies hook scripts for configuring .Pa /etc/resolv.conf and the hostname. +Your distribution may have included other hook scripts to say configure +ntp or ypbind. +A test hook is also supplied that simply echos the dhcp variables to the +console from DISCOVER message. +.Pp Each time .Nm is invoked,