Check if symlink with lstat(), mtime with stat()

With the new scheme using /etc/finit.d/available/, and symlinks from
there to the enabled directory, we need to check mtime of .conf files
using stat(), not lstat() which we need to check if .conf is a symlink.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-07-09 15:05:32 +02:00
parent 963b736d8b
commit 44f69bd575
+1
View File
@@ -514,6 +514,7 @@ void conf_reload_dynamic(void)
continue;
}
stat(path, &st);
TIMESPEC_TO_TIMEVAL(&mtime, &st.st_mtim);
parse_conf_dynamic(path, &mtime);
}