diff options
| author | Roy Marples <roy@marples.name> | 2008-05-20 16:05:15 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-05-20 16:05:15 +0000 |
| commit | 37156a6b53681b9ab70482b15358e0a86a08c74d (patch) | |
| tree | f4adf7b5714d7f1057b16e11507c59dbf49997ce /configure.c | |
| parent | 5f81be76fc605333ef92ecde09b093b1ebe5bd4d (diff) | |
| download | dhcpcd-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.c | 13 |
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 */ |
