Exit if config file fails to open
Now ntpd does not report any errors on config file open and proceeds as normal after file open has failed.
-
mentioned in issue #649 (closed)
-
If I specify -c parameter and the config file is not found, ntpsec fails silently without errors. However, I didn't know there was .d directory scanning feature in ntpsec. That could be fixed by removing the exit call from my patch and restoring
stream = NULL;.But looks like it is untested, since if I specify -c /etc/ntpsec.conf , it scans /etc/ntp.d instead of /etc/ntpsec.d .
2. Then the configuration directory, if it exists, is scanned. Normally this directory is /etc/ntp.d, but if the -c option is specified the /etc will be specified by the directory name of the -c argument.Edited by Sami Farin -
Sami Farin gitlab@mg.gitlab.com:
Sami Farin commented:
If I specify -c parameter and the config file is not found, ntpsec fails silently without errors. However, I didn't know there was .d directory scanning feature in ntpsec. That could be fixed by removing the exit call from my patch.
But looks like it is untested, since if I specify -c /etc/ntpsec.conf , it scans /etc/ntp.d instead of /etc/ntpsec.d .
2. Then the configuration directory, if it exists, is scanned. Normally this directory is /etc/ntp.d, but if the -c option is specified the /etc will be specified by the directory name of the -c argument.I'll take an updated patch, if you have time and interest. Otherwise let me know and I'll do it.