all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: guix-devel@gnu.org
Subject: [PATCH 1/1] services: openssh: Parameterize the OpenSSH package used by the service.
Date: Sun,  5 Mar 2017 13:29:23 -0500	[thread overview]
Message-ID: <0690257895f232d3ada094865dbfda1cbea84471.1488738563.git.leo@famulari.name> (raw)

* gnu/services/ssh.scm (<openssh-configuration>)[openssh]: New field.
(openssh-activation), (openssh-shepherd-service): Use it.
---
 gnu/services/ssh.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 7b2d4a8f0..c1d42e70c 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -260,6 +260,8 @@ The other options should be self-descriptive."
 (define-record-type* <openssh-configuration>
   openssh-configuration make-openssh-configuration
   openssh-configuration?
+  (openssh               openssh-configuration-openssh ;package
+                         (default openssh))
   (pid-file              openssh-configuration-pid-file
                          (default "/var/run/sshd.pid"))
   (port-number           openssh-configuration-port-number ;integer
@@ -297,7 +299,8 @@ The other options should be self-descriptive."
       (mkdir-p (dirname #$(openssh-configuration-pid-file config)))
 
       ;; Generate missing host keys.
-      (system* (string-append #$openssh "/bin/ssh-keygen") "-A")))
+      (system* (string-append #$(openssh-configuration-openssh config)
+                              "/bin/ssh-keygen") "-A")))
 
 (define (openssh-config-file config)
   "Return the sshd configuration file corresponding to CONFIG."
@@ -342,7 +345,7 @@ The other options should be self-descriptive."
     (openssh-configuration-pid-file config))
 
   (define openssh-command
-    #~(list (string-append #$openssh "/sbin/sshd")
+    #~(list (string-append #$(openssh-configuration-openssh config) "/sbin/sshd")
             "-D" "-f" #$(openssh-config-file config)))
 
   (list (shepherd-service
-- 
2.12.0

             reply	other threads:[~2017-03-05 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05 18:29 Leo Famulari [this message]
2017-03-05 18:51 ` [PATCH 1/1] services: openssh: Parameterize the OpenSSH package used by the service Leo Famulari
2017-03-06 10:21 ` 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=0690257895f232d3ada094865dbfda1cbea84471.1488738563.git.leo@famulari.name \
    --to=leo@famulari.name \
    --cc=guix-devel@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.