guix-commits
[Top][All Lists]
Advanced

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

01/01: services: openssh: Parameterize the OpenSSH package used by the s


From: Leo Famulari
Subject: 01/01: services: openssh: Parameterize the OpenSSH package used by the service.
Date: Mon, 6 Mar 2017 13:40:25 -0500 (EST)

lfam pushed a commit to branch master
in repository guix.

commit 23f22ba8afa9d3318c8a79022216dea3b9c866df
Author: Leo Famulari <address@hidden>
Date:   Sun Mar 5 13:23:21 2017 -0500

    services: openssh: Parameterize the OpenSSH package used by the service.
    
    * 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 7b2d4a8..c1d42e7 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



reply via email to

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