[pkg-dhcp-devel] Bug#469203: dhcp3-client: dhclient-script man page doesn't mention hooks dir
Colin Watson
cjwatson at debian.org
Mon Nov 1 16:49:53 UTC 2010
On Sat, Apr 04, 2009 at 12:21:50PM -0500, David Whitmarsh wrote:
> This patch adds mention of the /etc/dhclient-FOO-hooks.d/ directories to
> the dhclient-script(8) manpage.
I found this similar patch in the Ubuntu dhcp3 patches while
forward-porting them to isc-dhcp. It's by "nfm" on
https://bugs.launchpad.net/bugs/53024, not by me, but apparently nobody
sent it along at the time so I thought I should do so even if you don't
end up using it.
Thanks,
--
Colin Watson [cjwatson at debian.org]
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix_exit_hook_doc_manpage.diff by <nfm at nfm.id.au>
## packaging by Dustin Kirkland <kirkland at canonical.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch from nfm <nfm at nfm.id.au> for LP: #53024
## DP: Modified client/dhclient-script.8 manpage to include information about
## DP: the script directories /etc/dhcp/dhclient-enter-hooks.d and
## DP: /etc/dhcp/dhclient-enter-hooks.d.
@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' isc-dhcp-4.1.1-P1~/client/dhclient-script.8 isc-dhcp-4.1.1-P1/client/dhclient-script.8
--- isc-dhcp-4.1.1-P1~/client/dhclient-script.8 2009-07-24 23:04:51.000000000 +0100
+++ isc-dhcp-4.1.1-P1/client/dhclient-script.8 2010-11-01 16:42:20.000000000 +0000
@@ -66,13 +66,15 @@
file. To override the default behaviour, redefine this function in
the enter hook script.
.PP
-On after defining the make_resolv_conf function, the client script checks
+After defining the make_resolv_conf function, the client script checks
for the presence of an executable
.B ETCDIR/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
+shell '.' command. It also invokes all executable scripts in
+.B ETCDIR/dhclient-enter-hooks.d/*
+in the same way. 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
@@ -82,14 +84,18 @@
.B CLIENTBINDIR/dhclient-script
checks for the presence of an executable
.B ETCDIR/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
+script, which if present is invoked using the '.' command. All executable
+scripts in
+.B ETCDIR/dhclient-exit-hooks.d/*
+are also invoked. 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
-script can modify the valid of exit_status to change the exit status
+and
+.B ETCDIR/dhclient-exit-hooks.d/*
+scripts can modify the valid of exit_status to change the exit status
of dhclient-script.
.SH OPERATION
When dhclient needs to invoke the client configuration script, it
More information about the pkg-dhcp-devel
mailing list