diff options
| author | Roy Marples <roy@marples.name> | 2008-05-20 12:23:29 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-05-20 12:23:29 +0000 |
| commit | 0aeb350cfa645e333dbbc353064408e81ba8c93c (patch) | |
| tree | 90d928d7d2776c2de02e7800a4149ac9dfedebd3 /dhcpcd.sh.in | |
| parent | c61c4118d8a688f26a9bd53b061090aca5e45f66 (diff) | |
| download | dhcpcd-0aeb350cfa645e333dbbc353064408e81ba8c93c.tar.xz | |
Install dhcpcd.sh and hooks into /libexec by default. dhcpcd.conf, dhcpcd.duid and dhcpcd.hook are now in /etc.
Diffstat (limited to 'dhcpcd.sh.in')
| -rw-r--r-- | dhcpcd.sh.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dhcpcd.sh.in b/dhcpcd.sh.in index 4715101a..10ae50cd 100644 --- a/dhcpcd.sh.in +++ b/dhcpcd.sh.in @@ -17,11 +17,15 @@ restore_conf() mv -f "$1"-pre."${interface}" "$1" } +# We source each script into this one so that scripts run earlier can +# remove variables from the environment so later scripts don't see them. +# Thus, the user can create their dhcpcd.hook script to configure +# /etc/resolv.conf how they want and stop the system scripts ever updating it. for hook in \ - @SYSCONFDIR@/dhcpcd-hook \ - @SYSCONFDIR@/dhcpcd-hook.d/* \ + @SYSCONFDIR@/dhcpcd.hook \ + @HOOKDIR@/* do - if [ -f "${x}" ]; then - . "${x}" + if [ -f "${hook}" ]; then + . "${hook}" fi done |
