mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Fix incorrect use of variable arguments in run_parts() and simplify code
The run_parts() implementation used variable arguments in a bad way, resulting in it not working properly. Replaced va_*() code with a simple cmd argument that's passed to each script called. Also, the opendir()/readdir() code has been replaced with scandir() using regular alphasort(). This simplifies the code somewhat as well. Otherwise, minor cleanups. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -59,7 +59,7 @@ static void setup(void *UNUSED(arg))
|
||||
touch("/etc/resolvconf/run/enable-updates");
|
||||
|
||||
chdir("/etc/resolvconf/run/interface");
|
||||
run_parts("/etc/resolvconf/update.d", "-i", NULL);
|
||||
run_parts("/etc/resolvconf/update.d", "-i");
|
||||
chdir("/");
|
||||
#endif /* USE_ETC_RESOLVCONF_RUN */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user