From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8YEN-0003p3-Lf for guix-patches@gnu.org; Wed, 10 May 2017 16:29:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8YEJ-0007vN-0b for guix-patches@gnu.org; Wed, 10 May 2017 16:29:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8YEI-0007v2-Lf for guix-patches@gnu.org; Wed, 10 May 2017 16:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8YEI-0005Bx-GJ for guix-patches@gnu.org; Wed, 10 May 2017 16:29:02 -0400 Subject: bug#26548: [PATCH] install: Enable SSH in installation image. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170417213030.1489-1-mbakke@fastmail.com> <87inm2rtqa.fsf@gnu.org> <8760hby2u9.fsf@fastmail.com> Date: Wed, 10 May 2017 22:28:17 +0200 In-Reply-To: <8760hby2u9.fsf@fastmail.com> (Marius Bakke's message of "Mon, 08 May 2017 14:01:34 +0200") Message-ID: <8737ccsbha.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Marius Bakke Cc: 26548@debbugs.gnu.org Marius Bakke skribis: > Ludovic Court=C3=A8s writes: [...] >> This is a problem: in the installation instructions, we tell people to >> configure networking (possibly wireless) by hand, so we cannot expect >> the DHCP client to work directly when the image is booted. >> >> Also, the installation instructions would need to be updated. >> >> However, what we could do, instead, is to add an SSH service that is off >> by default (with (start? #f)) and does not depend on =E2=80=98networking= =E2=80=99. That >> way, people would only need to type >> >> herd start ssh-daemon >> >> to get the thing up and running. WDYT? > > I've changed this patch to use OpenSSH, but can't really see how to > override the openssh-shepherd-service to not depend on networking. Any > hints? :-) Does it make sense in the first place to have it depend on =E2=80=98network= ing=E2=80=99? Isn=E2=80=99t sshd able to adjust as new interfaces come up and down? That said, you could do (untested): (define custom-openssh-service-type (service-type (inherit openssh-service-type) (extensions (cons my-own-shepherd-service-extension (remove shepherd-service-extension? (service-type-extensions openssh-service-ty= pe)))))) where: (define (shepherd-service-extension? extension) (eq? shepherd-root-service-type (service-extension-target extension))) (define my-own-shepherd-service-extension (service-extension shepherd-root-service-type my-own-proc)) =E2=80=A6 Does that make sense? Ludo=E2=80=99.