unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/1] services: ntpd: Make large clock adjustments if necessary.
Date: Thu, 20 Oct 2016 21:44:24 +0200	[thread overview]
Message-ID: <87oa2eztyf.fsf@gnu.org> (raw)
In-Reply-To: <20161019213906.GA29612@jasmine> (Leo Famulari's message of "Wed, 19 Oct 2016 17:39:06 -0400")

Leo Famulari <leo@famulari.name> skribis:

> On Wed, Oct 19, 2016 at 10:49:32PM +0200, Ludovic Courtès wrote:
>> diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
>> index 7495179..ce281c5 100644
>> --- a/gnu/services/networking.scm
>> +++ b/gnu/services/networking.scm
>> @@ -265,11 +265,13 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
>>    ntp-configuration?
>>    (ntp      ntp-configuration-ntp
>>              (default ntp))
>> -  (servers  ntp-configuration-servers))
>> +  (servers  ntp-configuration-servers)
>> +  (allow-large-adjustment? ntp-allow-large-adjustment?
>> +                           (default #f)))
>>  
>>  (define ntp-shepherd-service
>>    (match-lambda
>> -    (($ <ntp-configuration> ntp servers)
>> +    (($ <ntp-configuration> ntp servers allow-large-adjustment?)
>>       (let ()
>>         ;; TODO: Add authentication support.
>>         (define config
>> @@ -296,7 +298,10 @@ restrict -6 ::1\n"))
>>                (requirement '(user-processes networking))
>>                (start #~(make-forkexec-constructor
>>                          (list (string-append #$ntp "/bin/ntpd") "-n"
>> -                              "-c" #$ntpd.conf "-u" "ntpd")))
>> +                              "-c" #$ntpd.conf "-u" "ntpd"
>> +                              #$@(if allow-large-adjustment?
>> +                                     '("-g")
>> +                                     '()))))
>>                (stop #~(make-kill-destructor))))))))
>>  
>>  (define %ntp-accounts
>> @@ -331,10 +336,13 @@ restrict -6 ::1\n"))
>>                                            ntp-service-activation)))))
>>  
>>  (define* (ntp-service #:key (ntp ntp)
>> -                      (servers %ntp-servers))
>> +                      (servers %ntp-servers)
>> +                      allow-large-adjustment?)
>>    "Return a service that runs the daemon from @var{ntp}, the
>>  @uref{http://www.ntp.org, Network Time Protocol package}.  The daemon will
>> -keep the system clock synchronized with that of @var{servers}."
>> +keep the system clock synchronized with that of @var{servers}.
>> +@var{allow-large-adjustment?} determines whether @command{ntpd} is allowed to
>> +make an initial adjustment of more than 1,000 seconds."
>>    (service ntp-service-type
>>             (ntp-configuration (ntp ntp) (servers servers))))
>>  
>
>> 
>> If that’s fine with you, I’ll commit it with a doc update.
>
> It looks good to me! Once we can run GuixSD on armhf or aarch64, I bet
> we will have lots of users with hardware lacking a battery-backed real
> time clock, and they will appreciate this option.

Good point.  Pushed as dc0322b51111d12e1d97e2cc456100c44dd31bb6.

Ludo’.

      reply	other threads:[~2016-10-20 19:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 23:21 [PATCH 1/1] services: ntpd: Make large clock adjustments if necessary Leo Famulari
2016-10-13  5:06 ` John Darrington
2016-10-13 14:12   ` Leo Famulari
2016-10-19 20:49     ` Ludovic Courtès
2016-10-19 21:39       ` Leo Famulari
2016-10-20 19:44         ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oa2eztyf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).