Author: cy
Date: Tue Oct 17 01:15:13 2017
New Revision: 324681
URL: https://svnweb.freebsd.org/changeset/base/324681

Log:
  Provide an option to run the anticongestion ntpd leapfile fetch in
  the background.
  
  Original patch submitted by feld@. I added the "optional" bit.
  
  Submitted by: feld (original patch)
  MFC after:    2 weeks

Modified:
  head/etc/defaults/periodic.conf
  head/etc/periodic/daily/480.leapfile-ntpd

Modified: head/etc/defaults/periodic.conf
==============================================================================
--- head/etc/defaults/periodic.conf     Tue Oct 17 01:12:17 2017        
(r324680)
+++ head/etc/defaults/periodic.conf     Tue Oct 17 01:15:13 2017        
(r324681)
@@ -141,6 +141,8 @@ daily_status_mail_rejects_shorten="NO"                      
# Shorten out
 
 # 480.leapfile-ntpd
 daily_ntpd_leapfile_enable="YES"                       # Fetch NTP leapfile
+daily_ntpd_leapfile_background="NO"                    # Fetch NTP leapfile
+                                                       # in the background
 
 # 480.status-ntpd
 daily_status_ntpd_enable="NO"                          # Check NTP status

Modified: head/etc/periodic/daily/480.leapfile-ntpd
==============================================================================
--- head/etc/periodic/daily/480.leapfile-ntpd   Tue Oct 17 01:12:17 2017        
(r324680)
+++ head/etc/periodic/daily/480.leapfile-ntpd   Tue Oct 17 01:15:13 2017        
(r324681)
@@ -13,8 +13,15 @@ fi
 
 case "$daily_ntpd_leapfile_enable" in
     [Yy][Ee][Ss])
-        anticongestion
-        service ntpd onefetch
+       case "$daily_ntpd_leapfile_background" in
+       [Yy][Ee][Ss])
+           (anticongestion && service ntpd onefetch) &
+           ;;
+       *)
+           anticongestion
+           service ntpd onefetch
+           ;;
+       esac
         ;;
 esac
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to