all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/1] services: ntpd: Make large clock adjustments if necessary.
Date: Wed, 19 Oct 2016 17:39:06 -0400	[thread overview]
Message-ID: <20161019213906.GA29612@jasmine> (raw)
In-Reply-To: <87h9883vz7.fsf@gnu.org>

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.

  reply	other threads:[~2016-10-19 21:39 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 [this message]
2016-10-20 19:44         ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=20161019213906.GA29612@jasmine \
    --to=leo@famulari.name \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.