Skip to content

Commit d531f8b

Browse files
committed
hooks: document that hooks are not run within their own process
1 parent d6be599 commit d531f8b

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

hooks/dhcpcd-run-hooks.8.in

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2323
.\" SUCH DAMAGE.
2424
.\"
25-
.Dd November 3, 2017
25+
.Dd Febuary 20, 2018
2626
.Dt DHCPCD-RUN-HOOKS 8
2727
.Os
2828
.Sh NAME
@@ -47,6 +47,19 @@ ntp or ypbind.
4747
A test hook is also supplied that simply echos the dhcp variables to the
4848
console from DISCOVER message.
4949
.Pp
50+
The hooks scripts are loaded into the current shell rather than executed
51+
in their own process.
52+
This allows each hook script, such as
53+
.Pa @SYSCONFDIR@/dhcpcd.enter-hook
54+
to customise environment variables or provide alternative functions to hooks
55+
further down the chain.
56+
As such, using the shell builtins
57+
.Ic exit ,
58+
.Ic exec
59+
or similar will cause
60+
.Nm
61+
to exit at that point.
62+
.Pp
5063
Each time
5164
.Nm
5265
is invoked,

0 commit comments

Comments
 (0)