guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: Use a directory owned by ntpd user for drift file.


From: John Darrington
Subject: Re: [PATCH] gnu: Use a directory owned by ntpd user for drift file.
Date: Thu, 8 Sep 2016 18:03:51 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Sep 08, 2016 at 08:57:57AM +0200, Vincent Legoll wrote:
     Hello,
     
     > +(define (ntp-service-activation config)
     > +  "Return the activation gexp for config"
     > +  #~(begin
     > +      (use-modules (guix build utils))
     > +
     > +      (define %user
     > +        (getpw "ntpd"))
     > +
     > +      (let ((directory "/var/run/ntpd"))
     > +          (mkdir-p directory)
     > +          (chown directory (passwd:uid %user) (passwd:gid %user)))))
     > +
     
     - why did you use %user (I thought %s were for kind of global vars) ?
     - why did you use define and not put it in the let just below ? Idon't see
     it being used elsewhere...
     

I think you need to look a little harder, because the answer to both your
(very valid) questions is : I copied it from other, existing examples.

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]