]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Improve documentation about the hooks.
authorRoy Marples <roy@marples.name>
Wed, 21 May 2008 09:16:24 +0000 (09:16 +0000)
committerRoy Marples <roy@marples.name>
Wed, 21 May 2008 09:16:24 +0000 (09:16 +0000)
dhcpcd.8.in
dhcpcd.sh.8.in

index cd93b3b71f881fb091ae3717447cfec5a45a435c..ea3d6fac9e79c827d71eb7259411f296b3fc24d7 100644 (file)
@@ -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.
index 1b4406a1c3d95331e1742fe97d0bc6ae90b66746..903f0c4d9caaeff7a200a100a8da39995e98a9b7 100644 (file)
@@ -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
 .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,