changeset 4227:637d42a68f76 draft

hooks: document that hooks are not run within their own process
author Roy Marples <roy@marples.name>
date Tue, 20 Feb 2018 09:06:38 +0000
parents fdca1e4dfd1e
children 5e355a5061a7
files hooks/dhcpcd-run-hooks.8.in
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hooks/dhcpcd-run-hooks.8.in	Tue Feb 20 08:36:53 2018 +0000
+++ b/hooks/dhcpcd-run-hooks.8.in	Tue Feb 20 09:06:38 2018 +0000
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 3, 2017
+.Dd Febuary 20, 2018
 .Dt DHCPCD-RUN-HOOKS 8
 .Os
 .Sh NAME
@@ -47,6 +47,19 @@
 A test hook is also supplied that simply echos the dhcp variables to the
 console from DISCOVER message.
 .Pp
+The hooks scripts are loaded into the current shell rather than executed
+in their own process.
+This allows each hook script, such as
+.Pa @SYSCONFDIR@/dhcpcd.enter-hook
+to customise environment variables or provide alternative functions to hooks
+further down the chain.
+As such, using the shell builtins
+.Ic exit ,
+.Ic exec
+or similar will cause
+.Nm
+to exit at that point.
+.Pp
 Each time
 .Nm
 is invoked,