mirror of
https://github.com/sheumann/hush.git
synced 2025-01-05 14:29:56 +00:00
Invoke run-parts on /etc/network/if-*.d per the behavior of
the upstream ifupdown code...
This commit is contained in:
parent
e15138a870
commit
51ed242ad6
@ -1023,8 +1023,7 @@ static int doit(char *str)
|
|||||||
static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt)
|
static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *buf[2];
|
char *buf[100];
|
||||||
|
|
||||||
for (i = 0; i < ifd->n_options; i++) {
|
for (i = 0; i < ifd->n_options; i++) {
|
||||||
if (strcmp(ifd->option[i].name, opt) == 0) {
|
if (strcmp(ifd->option[i].name, opt) == 0) {
|
||||||
if (!(*exec) (ifd->option[i].value)) {
|
if (!(*exec) (ifd->option[i].value)) {
|
||||||
@ -1033,11 +1032,9 @@ static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt);
|
bb_xasprintf(buf, "run-parts /etc/network/if-%s.d", opt);
|
||||||
buf[1] = NULL;
|
(*exec)(buf);
|
||||||
|
|
||||||
run_parts(buf, 2, environ);
|
|
||||||
free(buf[0]);
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user