summaryrefslogtreecommitdiffstats
path: root/configure.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-05-20 16:05:15 +0000
committerRoy Marples <roy@marples.name>2008-05-20 16:05:15 +0000
commit37156a6b53681b9ab70482b15358e0a86a08c74d (patch)
treef4adf7b5714d7f1057b16e11507c59dbf49997ce /configure.c
parent5f81be76fc605333ef92ecde09b093b1ebe5bd4d (diff)
downloaddhcpcd-37156a6b53681b9ab70482b15358e0a86a08c74d.tar.xz
Add a -C, --nohook option to skip the running of hook scripts. Makes it easier to just not do any configuring of resolv.conf
Diffstat (limited to 'configure.c')
-rw-r--r--configure.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.c b/configure.c
index 47a516e3..5c08c32e 100644
--- a/configure.c
+++ b/configure.c
@@ -98,6 +98,19 @@ exec_script(const struct options *options, const char *iface,
elen += configure_env(env + elen, "new", dhcpn, options);
}
}
+ /* Add our base environment */
+ if (options->environ) {
+ e = 0;
+ while (options->environ[e++])
+ ;
+ env = xrealloc(env, sizeof(char *) * (elen + e + 1));
+ e = 0;
+ while (options->environ[e]) {
+ env[elen + e] = xstrdup(options->environ[e]);
+ e++;
+ }
+ elen += e;
+ }
env[elen] = '\0';
/* OK, we need to block signals */