aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/script.c')
-rw-r--r--networking/udhcp/script.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index b7d78624c..cae4db7af 100644
--- a/networking/udhcp/script.c
+++ b/networking/udhcp/script.c
@@ -1,6 +1,6 @@
1/* script.c 1/* script.c
2 * 2 *
3 * Functions to call the DHCP client notification scripts 3 * Functions to call the DHCP client notification scripts
4 * 4 *
5 * Russ Dill <Russ.Dill@asu.edu> July 2001 5 * Russ Dill <Russ.Dill@asu.edu> July 2001
6 * 6 *
@@ -157,7 +157,7 @@ static char **fill_envp(struct dhcpMessage *packet)
157 if (!(over & FILE_FIELD) && packet->file[0]) num_options++; 157 if (!(over & FILE_FIELD) && packet->file[0]) num_options++;
158 if (!(over & SNAME_FIELD) && packet->sname[0]) num_options++; 158 if (!(over & SNAME_FIELD) && packet->sname[0]) num_options++;
159 } 159 }
160 160
161 envp = xcalloc(sizeof(char *), num_options + 5); 161 envp = xcalloc(sizeof(char *), num_options + 5);
162 j = 0; 162 j = 0;
163 asprintf(&envp[j++], "interface=%s", client_config.interface); 163 asprintf(&envp[j++], "interface=%s", client_config.interface);
@@ -220,13 +220,13 @@ void run_script(struct dhcpMessage *packet, const char *name)
220 return; 220 return;
221 } else if (pid == 0) { 221 } else if (pid == 0) {
222 envp = fill_envp(packet); 222 envp = fill_envp(packet);
223 223
224 /* close fd's? */ 224 /* close fd's? */
225 225
226 /* exec script */ 226 /* exec script */
227 execle(client_config.script, client_config.script, 227 execle(client_config.script, client_config.script,
228 name, NULL, envp); 228 name, NULL, envp);
229 LOG(LOG_ERR, "script %s failed: %m", client_config.script); 229 LOG(LOG_ERR, "script %s failed: %m", client_config.script);
230 exit(1); 230 exit(1);
231 } 231 }
232} 232}