From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1kdd9w-0005BY-RH for ptxdist@pengutronix.de; Fri, 13 Nov 2020 18:46:53 +0100 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23991030AbgKMRquA1-L3 (ORCPT ); Fri, 13 Nov 2020 18:46:50 +0100 Date: Fri, 13 Nov 2020 18:46:48 +0100 From: Ladislav Michl Message-ID: <20201113174648.GA292963@lenoch> References: <20201113141955.3477005-1-artur@4wiebe.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201113141955.3477005-1-artur@4wiebe.de> Subject: Re: [ptxdist] [PATCH] DRAFT: openssh: make host key generation optional List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Artur Wiebe On Fri, Nov 13, 2020 at 03:19:55PM +0100, Artur Wiebe wrote: > How can openssh.postinst be disabled from within the rule files? The very same could be achieved with symlink in your BSP: projectroot/etc/rc.once.d/openssh -> /dev/null > --- > rules/openssh.in | 14 ++++++++++---- > rules/openssh.make | 2 ++ > 2 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/rules/openssh.in b/rules/openssh.in > index 09f5c5555..f9d1affbd 100644 > --- a/rules/openssh.in > +++ b/rules/openssh.in > @@ -6,10 +6,10 @@ menuconfig OPENSSH > select OPENSSL > select LIBC_CRYPT > select LIBC_UTIL > - select RC_ONCE if OPENSSH_SSHD && RUNTIME > + select RC_ONCE if OPENSSH_SSHD_GENKEYS && RUNTIME > select BUSYBOX_START_STOP_DAEMON if OPENSSH_SSHD_STARTSCRIPT > select LIBSELINUX if GLOBAL_SELINUX > - select OPENSSH_KEYGEN if OPENSSH_SSHD > + select OPENSSH_KEYGEN if OPENSSH_SSHD_GENKEYS > prompt "openssh " > help > secure shell client/server, an rlogin/rsh/rcp replacement > @@ -40,15 +40,21 @@ config OPENSSH_SSHD > config OPENSSH_SSHD_STARTSCRIPT > bool > default y > - depends on OPENSSH_SSHD > + depends on OPENSSH_SSHD && INITMETHOD_BBINIT > prompt "install /etc/init.d/openssh" > > config OPENSSH_SSHD_SYSTEMD_UNIT > bool > default y > - depends on OPENSSH_SSHD && SYSTEMD > + depends on OPENSSH_SSHD && INITMETHOD_SYSTEMD > prompt "install systemd unit files for sshd" > > +config OPENSSH_SSHD_GENKEYS > + bool > + default y > + depends on OPENSSH_SSHD > + prompt "generate sshd host keys at first boot" > + > config OPENSSH_SCP > bool "scp" > help > diff --git a/rules/openssh.make b/rules/openssh.make > index cae04487f..0da2f23cd 100644 > --- a/rules/openssh.make > +++ b/rules/openssh.make > @@ -105,8 +105,10 @@ ifdef PTXCONF_OPENSSH_SSHD > /etc/ssh/moduli) > @$(call install_copy, openssh, 0, 0, 0755, -, \ > /usr/sbin/sshd) > +ifdef OPENSSH_SSHD_GENKEYS > @$(call install_alternative, openssh, 0, 0, 0755, /etc/rc.once.d/openssh) > endif > +endif > > ifdef PTXCONF_INITMETHOD_BBINIT > ifdef PTXCONF_OPENSSH_SSHD_STARTSCRIPT > -- > 2.29.2 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de