[Git][NTPsec/ntpsec][master] Things that can be done before configuration should be.
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Jul 15 13:23:26 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
d923e235 by Eric S. Raymond at 2016-07-15T09:23:14-04:00
Things that can be done before configuration should be.
This makes the init sequence easiuer to understand.
- - - - -
1 changed file:
- ntpd/ntpd.c
Changes:
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -947,12 +947,6 @@ ntpdmain(
}
/*
- * Get the configuration.
- */
- have_interface_option = (!listen_to_virtual_ips || explicit_interface);
- intercept_getconfig(explicit_config);
-
- /*
* ntpd's working set is never going to be large relative to memory
* availability on modern machines. Do what chrony does and indulge it;
* we get some latency improvement that way.
@@ -968,9 +962,6 @@ ntpdmain(
msyslog(LOG_INFO, "successfully locked into RAM");
}
- loop_config(LOOP_DRIFTINIT, 0);
- report_event(EVNT_SYSRESTART, NULL, NULL);
-
if (ipv4_works && ipv6_works) {
if (opt_ipv4)
ipv6_works = false;
@@ -984,6 +975,15 @@ ntpdmain(
else if (opt_ipv6 && !ipv6_works)
msyslog(LOG_WARNING, "-6/--ipv6 ignored, IPv6 networking not found.");
+ /*
+ * Get the configuration.
+ */
+ have_interface_option = (!listen_to_virtual_ips || explicit_interface);
+ intercept_getconfig(explicit_config);
+
+ loop_config(LOOP_DRIFTINIT, 0);
+ report_event(EVNT_SYSRESTART, NULL, NULL);
+
/* drop root privileges */
if (sandbox(droproot, user, group, chrootdir, interface_interval!=0) && interface_interval) {
interface_interval = 0;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d923e235b1b1a4d7eda3d21154a19a39585976b2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160715/df528a38/attachment.html>
More information about the vc
mailing list