From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 1/1] services: openssh: Parameterize the OpenSSH package used by the service. Date: Sun, 5 Mar 2017 13:29:23 -0500 Message-ID: <0690257895f232d3ada094865dbfda1cbea84471.1488738563.git.leo@famulari.name> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckauT-0008Qe-81 for guix-devel@gnu.org; Sun, 05 Mar 2017 13:29:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckauO-0002vo-AY for guix-devel@gnu.org; Sun, 05 Mar 2017 13:29:33 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38499) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ckauO-0002vi-4Z for guix-devel@gnu.org; Sun, 05 Mar 2017 13:29:28 -0500 Received: from localhost.localdomain (c-73-188-17-148.hsd1.pa.comcast.net [73.188.17.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 3ED267E1D7 for ; Sun, 5 Mar 2017 13:29:27 -0500 (EST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/services/ssh.scm ()[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 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